找不到 libpython2.7.so.1.0

找不到 libpython2.7.so.1.0

我正在尝试在 Ubuntu 19.10 上安装一个名为 Prism 管道的应用程序。安装程序失败并显示以下错误:

Traceback (most recent call last):
File "Scripts/PrismInstaller.py", line 65, in <module>
from PySide.QtCore import *
ImportError: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "Scripts/PrismCore.py", line 68, in <module>
from PySide.QtCore import *
ImportError: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

如果我运行locate libpython2.7.so.1.0,它确实会给我空白的结果。如果我只是python在我的终端中运行,Python 会话将以 python 2.7.17 正确启动,所以我会说它已安装在我的系统上(我认为这是 ubuntu 附带的默认安装)。

因此经过谷歌研究后我发现我可能需要安装 libpython2.7,但sudo apt-get install libpython2.7结果是:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.17~rc1-1) but 2.7.17-1~19.10 is to be installed
E: Unable to correct problems, you have held broken packages.

我该如何修复?提前致谢

答案1

运行以下命令将安装libpython2.7.so.1.0

sudo apt-get install python2.7-dev

相关内容