我试图从 Debian 6 升级到 7.11(喘息)。我已将sources.list更改为:
deb http://ftp.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy-updates main
deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free
首先是 apt-get update,然后是 apt-get Upgrade,最后是 apt-get dist-upgrade
经过所有这些步骤后,我已在文件 /etc/debian_version 中获得值 7.11,但由于以下错误,我无法使用 apt 执行任何操作:
root@server:~# apt-get dist-upgrade
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12)
root@server:~# apt-get update
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12)
答案1
您有一个副本,libstdc++.so.6
其中的副本/usr/local/lib
优先于系统的副本(在/usr/lib
其子目录中或其子目录之一)。要apt
再次工作,您需要删除它或至少重命名它:
sudo mv /usr/local/lib/libstdc++.so.6{,.old}
您还应该重命名该文件libstdc++.so.6
指向;完成上述操作后,运行:
tgt=$(readlink /usr/local/lib/libstdc++.so.6.old)
sudo mv "/usr/local/lib/${tgt}"{,.old}