如何解决从 power shell 通过 ssh 远程运行命令
当我从机器本身运行这个 ./start.sh 脚本时,exe 运行完美。但是当我尝试使用不同 Windows 机器的 PowerShell 远程运行此命令时,我收到此错误:
**加载共享库时出错:libentity.so.5.4.beta:无法打开共享对象文件:没有这样的文件或目录
我曾尝试寻找相同的问题,但未能找到。
PS C:\Users\Administrator> plink -pw tpstps iris@192.168.5.58 "./start.sh"
Running comms.exe
Running abc.exe
Running PM2
TERM environment variable not set.
./comms.exe: error while loading shared libraries: libentity.so.5.4.beta: cannot open shared object file: No such file or directory
./abc.exe: error while loading shared libraries: libboost_serialization.so.1.59.0: cannot open shared object file: No such file or directory
start.sh 文件:
echo
echo "Running comms.exe"
./comms.exe&
echo
echo "Running abc.exe"
./abc.exe&
echo
echo "Running PM2"
pm2 start
exit 0
解决方法
问题已解决,我必须在执行 .sh 文件之前将源设置为我的 bash_profile。现在,工作命令如下所示:
plink -pw tpstps iris@192.168.5.58 "source ~/.bash_profile; ./start.sh"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。