我想在我的 ubuntu 服务器 14.04 LTS 上安装一个 ARK 服务器,但我觉得我完全搞乱了我的系统。
我所做的是这。
nano /etc/apt/sources.list
并将其添加到文件中
# Experimental/unstable (sid) repositories
deb http://ftp.debian.org/debian experimental main
deb http://ftp.debian.org/debian sid main
进而:
apt-get update
apt-get install libc6-dev
但现在我已经破坏了依赖关系。我尝试了所有标准方法。
apt-get install -f
apt-get upgrade -f
apt-get dist-upgrade
我尝试了网上看到的很多方法,但都没有用。
系统运行顺利,一切正常,除了升级或安装新软件包,因为未满足的依赖关系会阻止它。
的输出apt-get upgrade
为:
libc-bin : depends on: libc6 (< 2.20) but 2.22-3 is installed
libc-l10n : brocken: locales (< 2.21-0experimental1) but 2.13+git20120306-12.1 is installed
libc6 : brocken: locales (< 2.22) but 2.13+git20120306-12.1 is installed
我把输出从德语翻译成了英语。那么我读到的结果是libc6
太新了?所以我必须用旧版本替换它吗?
我不知道。我希望除了擦除光盘之外还有其他解决方案。我发现错误太晚了,所以我无法及时回滚来修复它。我做的一点也不聪明……但今年……学到了一些教训……:-/
感谢您花时间和精力阅读本文,也感谢您的帮助。:-)
编辑
这是输出apt-cache policy libc6 libc6-dev locales
libc6:
Installiert: 2.22-2
Installationskandidat: 2.22-2
Versionstabelle:
*** 2.22-2 0
100 /var/lib/dpkg/status
2.19-0ubuntu6.7 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-security/main amd64 Packages
2.19-0ubuntu6 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
libc6-dev:
Installiert: 2.22-2
Installationskandidat: 2.22-2
Versionstabelle:
*** 2.22-2 0
100 /var/lib/dpkg/status
2.19-0ubuntu6.7 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-security/main amd64 Packages
2.19-0ubuntu6 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
locales:
Installiert: 2.13+git20120306-12.1
Installationskandidat: 2.13+git20120306-12.1
Versionstabelle:
*** 2.13+git20120306-12.1 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.13+git20120306-12 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
编辑
输出apt-get install libc6=2.19-0ubuntu6.7 libc6-dev=2.19-0ubuntu6.7
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:
libc-dev-bin : Depends: libc6 (> 2.22) but 2.19-0ubuntu6.7 is to be installed
Recommends: manpages-dev but it is not going to be installed
libc-l10n : Breaks: locales (< 2.21-0experimental1) but 2.13+git20120306-12.1 is to be installed
libc6-dev : Depends: libc-dev-bin (= 2.19-0ubuntu6.7)
libc6-i386 : Depends: libc6 (= 2.22-2) but 2.19-0ubuntu6.7 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
编辑
输出apt-cache policy libc-dev-bin libc-l10n libc6-dev libc6-i386
libc-dev-bin:
Installed: 2.22-2
Candidate: 2.22-2
Version table:
*** 2.22-2 0
100 /var/lib/dpkg/status
2.19-0ubuntu6.7 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-security/main amd64 Packages
2.19-0ubuntu6 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
libc-l10n:
Installed: 2.22-0experimental3
Candidate: 2.22-0experimental3
Version table:
*** 2.22-0experimental3 0
100 /var/lib/dpkg/status
libc6-dev:
Installed: 2.22-2
Candidate: 2.22-2
Version table:
*** 2.22-2 0
100 /var/lib/dpkg/status
2.19-0ubuntu6.7 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-security/main amd64 Packages
2.19-0ubuntu6 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
libc6-i386:
Installed: 2.22-2
Candidate: 2.22-2
Version table:
*** 2.22-2 0
100 /var/lib/dpkg/status
2.19-0ubuntu6.7 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-updates/main amd64 Packages
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty-security/main amd64 Packages
2.19-0ubuntu6 0
500 ftp://ftp.stratoserver.net/pub/linux/ubuntu/ trusty/main amd64 Packages
编辑
输出apt-get purge libc-l10n
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:
libc-bin : Depends: libc6 (< 2.20) but 2.22-2 is to be installed
libc6 : Breaks: locales (< 2.22) but 2.13+git20120306-12.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
输出apt-get install libc-dev-bin=2.19-0ubuntu6.7 libc6-dev=2.19-0ubuntu6.7 libc6-i386=2.19-0ubuntu6.7
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:
libc-bin : Depends: libc6 (< 2.20) but 2.22-2 is to be installed
libc-dev-bin : Depends: libc6 (< 2.20) but 2.22-2 is to be installed
Recommends: manpages-dev but it is not going to be installed
libc-l10n : Breaks: locales (< 2.21-0experimental1) but 2.13+git20120306-12.1 is to be installed
libc6 : Breaks: locales (< 2.22) but 2.13+git20120306-12.1 is to be installed
libc6-dev : Depends: libc6 (= 2.19-0ubuntu6.7) but 2.22-2 is to be installed
libc6-i386 : Depends: libc6 (= 2.19-0ubuntu6.7) but 2.22-2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案1
我们需要libc6
再次降级您意外从 Debian Sid 存储库升级的相关软件包。
我们首先清空您的包缓存,以防止意外地从那里重新安装不正确的包,尽管您已经使用此命令再次禁用了存储库:
sudo apt-get clean
然后,我们libc
从官方 Ubuntu 存储库将所有有问题的相关软件包降级为正确的版本,并libc-l10n
使用这个长命令删除不可用的软件包:
sudo apt-get install libc6=2.19-0ubuntu6.7 libc6-dev=2.19-0ubuntu6.7 libc6-i386=2.19-0ubuntu6.7 libc-dev-bin=2.19-0ubuntu6.7 libc-bin=2.19-0ubuntu6.7 libc-l10n-
这会起作用。(您已经确认它有效)
答案2
你可以通过降级来解决问题libc6
apt-get install **--reinstall** libc6=2.15-0ubuntu10.15 libc6-dev=2.15-0ubuntu10.15
apt-get check
如果你遇到了和 Bill Z 类似的错误,请尝试以下命令
mkdir -p /var/backup/usr/share/doc/libc6/
mv /usr/share/doc/libc6/* /var/backup/usr/share/doc/libc6/
apt-get install --reinstall libc6=2.15-0ubuntu10.15 libc6-dev=2.15-0ubuntu10.15
apt-get check
apt-get -f install