debian – apt python错误阻止我解决apt-get install的依赖性问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了debian – apt python错误阻止我解决apt-get install的依赖性问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4541字,纯文字阅读大概需要7分钟。
内容图文
![debian – apt python错误阻止我解决apt-get install的依赖性问题](/upload/InfoBanner/zyjiaocheng/738/35559fbff10340b59e07d18a1162e779.jpg)
在Debian 6服务器上依赖性问题阻止我安装nis(或任何软件包).当我尝试解决该问题时,我得到一个python错误.如何解决此问题并重新获得安装软件包的能力?
我用google搜索,发现有几个人报告了相同的错误消息,但没有人有解决方案.我也检查了SE无济于事.这影响了我公司的10台服务器.
root 7 # apt-get install nis
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libglib2.0-dev : Depends: libglib2.0-0 (= 2.24.2-1) but 2.40.0-2 is to be installed
nis : Depends: libdbus-glib-1-2 (>= 0.78) but it is not going to be installed
Depends: libslp1 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
那么我试着按照以下建议解决这个问题:
root 8 # apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
xfonts-encodings ttf-dejavu-core xfonts-utils libxfont1 libpango1.0-common libdb5.1 libxcb-render-util0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libglib2.0-dev
Suggested packages:
libglib2.0-doc
The following packages will be upgraded:
libglib2.0-dev
1 upgraded, 0 newly installed, 0 to remove and 559 not upgraded.
42 not fully installed or removed.
Need to get 0 B/2642 kB of archives.
After this operation, 3982 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: error processing /var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb (--unpack):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'libglib2.0-dev':
`Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')
configured to not write apport reports
Errors were encountered while processing:
/var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root 9 #
我也试过了
apt-get autoremove
但这只是告诉我要做的
apt-get -f install
再次.
我试着查看有问题的文件,但我得到了这个:
root 11 # cat /var/lib/dpkg/tmp.ci/control
/var/lib/dpkg/tmp.ci/control: No such file or directory
按照要求:
root 14 # apt-cache policy nis libglib2.0-dev libglib2.0-0 libdbus-glib-1-2 libslp1
libglib2.0-0:
Installed: 2.40.0-2
Candidate: 2.40.0-2
Version table:
*** 2.40.0-2 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
100 /var/lib/dpkg/status
libdbus-glib-1-2:
Installed: (none)
Candidate: 0.102-1
Version table:
0.102-1 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libglib2.0-dev:
Installed: 2.24.2-1
Candidate: 2.40.0-2
Version table:
2.40.0-2 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
*** 2.24.2-1 0
100 /var/lib/dpkg/status
nis:
Installed: (none)
Candidate: 3.17-33
Version table:
3.17-33 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libslp1:
Installed: (none)
Candidate: 1.2.1-9
Version table:
1.2.1-9 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
按照要求:
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.debian.org/ stable/updates/main Translation-en
500 http://security.debian.org/ stable/updates/main amd64 Packages
release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main
origin security.debian.org
500 http://ftp.us.debian.org/debian/ unstable/main Translation-en
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main
origin ftp.us.debian.org
Pinned packages:
解决方法:
这是一个有趣的.海报试图修复一台可通过ssh远程访问的机器.这台机器已经部分升级到不稳定,包括libc6.但是,零件仍处于稳定状态,并且处于挤压版本.海报希望机器完全稳定.
我走过海报修理他的机器.聊天会话从http://chat.stackexchange.com/transcript/message/15047213#15047213开始
摘要:
> sources.list只有不稳定的来源.添加稳定的.
还在/ etc / apt / preferences中添加了一些节来设置优先级编号
用于测试并且不稳定到50.
>升级到稳定版本.
>安装了apt-show-versions和ranapt-show-versions | grep不稳定
获取有关哪些软件包来自unstable的信息.
>删除除libc6以外的所有不稳定包.
>注释掉不稳定的来源.注意:之前删除不稳定的来源
运行apt-show-versions会使apt-show-versions无法使用
告诉哪些包来自不稳定.
>将libc6从不稳定降级到稳定.
>然后通过apt-get dist-upgrade进行apt-get升级.
>删除了2.6内核包.
最后的想法:可能有一种更好的方法来发现哪些包比使用apt-show-versions更不稳定,但我目前还不知道.如果你这样做,请评论.
内容总结
以上是互联网集市为您收集整理的debian – apt python错误阻止我解决apt-get install的依赖性问题全部内容,希望文章能够帮你解决debian – apt python错误阻止我解决apt-get install的依赖性问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。