linux – 破解包试图安装python-dev的问题
作者:互联网
我需要安装python-dev才能安装另一个应用程序,但是当我执行sudo apt-get install python-dev时,我得到:以下软件包有未满足的依赖项:带有依赖项列表.所以我添加它们直到没有更多依赖项,将命令行保留为:sudo apt-get install python-dev libpython2.7-dev python2.7-dev libexpat1-dev libexpat1.
在此之后,我得到:
The following packages have unmet dependencies:
libexpat1-dev : Depends: libexpat1 (= 2.1.0-6+b3) but 2.1.0-6+deb8u1 is to be installed
E: Unable to correct problems, you have held broken packages.
我打开了Synaptic并搜索了破损的包裹,但没有.我也尝试使用aptitude而不是apt-get:
The following NEW packages will be installed:
libexpat1-dev{ab} libpython-dev{a} libpython2.7-dev{a} python-dev
python2.7-dev{a}
0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/19.0 MB of archives. After unpacking 31.6 MB will be used.
The following packages have unmet dependencies:
libexpat1-dev : Depends: libexpat1 (= 2.1.0-6+b3) but 2.1.0-6+deb8u1 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libexpat1-dev [Not Installed]
2) libpython-dev [Not Installed]
3) libpython2.7-dev [Not Installed]
4) python-dev [Not Installed]
5) python2.7-dev [Not Installed]
Accept this solution? [Y/n/q/?]
到目前为止一切都那么好(我想),所以我按了’Y’,但它列出了很多要删除的包,并要求我继续.因为我对此有疑问,所以我按了’n’,但现在当我再一次复制建议删除的包时,它什么也没做:
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
任何帮助将不胜感激.提前致谢.
编辑:
现在我正在使用本地存储库,因为我遇到麻烦连接到debian ftp(可能是因为网络管理员或代理).所以我的sources.lst是:
#deb http://ftp.debian.org/debian/ jessie main contrib non-free
#deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
#deb http://security.debian.org/ jessie/updates main contrib non-free
#deb-src http://security.debian.org/ jessie/updates main contrib non-free
# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
#deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
#deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
##Local Repository
deb file:/media/ramon-debian/JimiHendrix/debian8repo/debian jessie main contrib non-free
deb file:/media/ramon-debian/JimiHendrix/debian8repo/debian stable main contrib non-free
解决方法:
您正在使用的存储库出现问题.
https://tracker.debian.org/pkg/expat显示在Debian中,没有包libexpat1_2.1.0-6 b3 …
使用rm -rf / var / lib / apt / lists / *删除apt缓存,然后再次使用apt-get update.如果本地镜像正常,则应该有可用包的工作(一致)列表.如果没有,那么当地的回购就破了……
标签:linux,debian,dependencies,package-management 来源: https://codeday.me/bug/20190816/1669198.html