我正在尝试在 ubuntu 16.04 上安装 python 图形工具。
我尝试了这里建议的两条路径https://graph-tool.skewed.de/download#packages:
- 使用手动安装
.\configure
make
make install
- 预编译包和
apt-get install python-graph-tool
手动安装在阶段存在很多问题make
。
第二条路径(也是建议的路径)出现以下错误:
sudo apt-get -y --force-yes install python-graph-tool
[sudo] password for riccardo:
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:
python-graph-tool : Depends: libboost-iostreams1.58.0 but it is not installable
Depends: libboost-python1.58.0 but it is not installable
Depends: libboost-regex1.58.0 but it is not installable
Depends: libboost-graph1.58.0 but it is not installable
Depends: libboost-system1.58.0 but it is not installable
Depends: libboost-thread1.58.0 but it is not installable
E: Unable to correct problems, you have held broken packages.
如果我运行,sudo apt-get install libboost-all-dev
我会得到:
sudo apt-get install libboost-all-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libboost-all-dev is already the newest version (1.61.0.2).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
如果我尝试手动安装每个单独的包,我会得到例如:
sudo apt-get install libboost-coroutine1.58.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libboost-coroutine1.58.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libboost-coroutine1.58.0' has no installation candidate
我对 Python 和 Linux 都很陌生。你能帮我找出这里出了什么问题吗?
非常感谢
答案1
在 Ubuntu 软件包索引中查找缺失的软件包xenial-updates
(例子) 并下载适合您的体系结构的软件包。然后使用您最喜欢的包管理器安装它们。在命令行上可以是:
sudo apt install libboost*_$(dpkg --print-architecture).deb
答案2
文档中说 DISTRIBUTION 可以是以下任何一种
xenial, yakkety, zesty
我遇到了和你一样的错误zesty
:
The following packages have unmet dependencies:
python3-graph-tool : Depends: libboost-iostreams1.62.0 but it is not installable
Depends: libboost-python1.62.0 but it is not installable
Depends: libboost-regex1.62.0 but it is not installable
Depends: libboost-graph1.62.0 but it is not installable
Depends: libboost-system1.62.0 but it is not installable
Depends: libboost-thread1.62.0 but it is not installable
Recommends: python3-matplotlib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
,但尝试时没有问题xenial
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gdebi-core libgles1-mesa linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic linux-headers-4.4.0-72 linux-headers-4.4.0-72-generic
linux-image-4.4.0-62-generic linux-image-4.4.0-72-generic linux-image-extra-4.4.0-62-generic linux-image-extra-4.4.0-72-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
fonts-lyx libboost-context1.58.0 libboost-coroutine1.58.0 libboost-graph1.58.0 libboost-python1.58.0 libcgal11v5 libjs-jquery-ui
python-matplotlib-data python3-cycler python3-dateutil python3-decorator python3-matplotlib python3-numpy python3-pyparsing python3-scipy
python3-tk python3-tz ttf-bitstream-vera
Suggested packages:
libjs-jquery-ui-docs ffmpeg ipython3 python-matplotlib-doc python3-cairocffi python3-gobject python3-nose python3-pyqt4 python3-sip
python3-tornado ttf-staypuft gfortran python-numpy-doc python3-dev python3-numpy-dbg python-scipy-doc tix python3-tk-dbg
The following NEW packages will be installed:
fonts-lyx libboost-context1.58.0 libboost-coroutine1.58.0 libboost-graph1.58.0 libboost-python1.58.0 libcgal11v5 libjs-jquery-ui
python-matplotlib-data python3-cycler python3-dateutil python3-decorator python3-graph-tool python3-matplotlib python3-numpy python3-pyparsing
python3-scipy python3-tk python3-tz ttf-bitstream-vera
0 upgraded, 19 newly installed, 0 to remove and 61 not upgraded.
Need to get 51.1 MB of archives.
After this operation, 247 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
python3-graph-tool
Install these packages without verification? [y/N] Y
答案3
除了上述尝试改变分布
deb [ 架构=amd64 ]https://downloads.skewed.de/apt分销主页
页面上的选项(bullseye、buster、sid、bionic、eoan、focal、groovy)中,只有“focal”可以正常工作。