【发布时间】:2021-07-07 11:23:03
【问题描述】:
当我从机器本身运行这个 ./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。它就像一个魅力:)
-
这能回答你的问题吗? Script via Plink in .bat behaves differently
标签: linux shared-libraries plink