我试图在Debian 7(Wheezy)上安装Python 3.6,它看起来在尝试过程中,我搞砸了apt包依赖关系,并在尝试纠正事情时删除了太多的包。
现在我发现Java 8不再安装在系统上(以前是这样),我需要JBoss。
当我尝试安装Java 8(遵循以下步骤: http : //www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html )时,我收到有关未满足的消息“locales”的依赖关系:
root@vps404561:/etc/apt# apt-get install oracle-java8-installer 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: oracle-java8-installer : Depends: locales E: Unable to correct problems, you have held broken packages.
我试图按照这个问题的回答提供的步骤: 如何修复从jessie仓库中更新破坏后的Debian Wheezy上的语言环境
所以我先清除了语言环境:
root@vps404561:/etc/apt# apt-get purge locales Reading package lists... Done Building dependency tree Reading state information... Done Package 'locales' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
完成没有错误。
然后,我尝试使用aptitude来安装语言环境,但是有一个关于未满足的依赖关系的投诉,build议保持语言环境为“未安装”。 所以我select了不接受提供的解决scheme,然后提出了以下build议:
完全控制台输出:
root@vps404561:/etc/apt# aptitude install locales The following NEW packages will be installed: locales{b} 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 5717 kB of archives. After unpacking 15.5 MB will be used. The following packages have unmet dependencies: locales : Depends: glibc-2.13-1 which is a virtual package. libc6 : Breaks: locales (< 2.24) but 2.13-38+deb7u12 is to be installed. The following actions will resolve these dependencies: Keep the following packages at their current version: 1) locales [Not Installed] Accept this solution? [Y/n/q/?] n The following actions will resolve these dependencies: Remove the following packages: 1) libevent-2.1-6 Downgrade the following packages: 2) libc6 [2.24-17 (now) -> 2.13-38+deb7u12 (oldoldstable)] 3) libkeyutils1 [1.5.9-9 (now) -> 1.5.5-3+deb7u1 (oldoldstable)] Accept this solution? [Y/n/q/?] ^
可以继续吗?
我不想打破软件包的依赖甚至更多…
解决这个问题的最好办法是什么? 有一种方法可以安全地清理依赖项(=重置为系统初始状态)吗?
顺便说一句:我尝试了其他职位上build议的几种方法(例如apt-get clean; apt-get update; apt-get dist-upgrade; dpkg -C),但是他们没有做任何改变,也没有显示更多的错误:
root@vps404561:/etc/apt# apt-get clean root@vps404561:/etc/apt# apt-get update Hit http://ppa.launchpad.net xenial Release.gpg Hit http://ftp.debian.org wheezy Release.gpg Hit http://security.debian.org wheezy/updates Release.gpg Hit http://ftp.debian.org wheezy Release Hit http://ppa.launchpad.net xenial Release Hit http://security.debian.org wheezy/updates Release Hit http://ftp.debian.org wheezy/main amd64 Packages Hit http://ppa.launchpad.net xenial/main Sources Hit http://ftp.debian.org wheezy/main Translation-en Hit http://security.debian.org wheezy/updates/main amd64 Packages Hit http://ppa.launchpad.net xenial/main amd64 Packages Hit http://security.debian.org wheezy/updates/main Translation-en Hit http://ppa.launchpad.net xenial/main Translation-en Hit http://repo.mongodb.org wheezy/mongodb-org/3.4 Release.gpg Hit http://repo.mongodb.org wheezy/mongodb-org/3.4 Release Hit https://packages.graylog2.org stable Release.gpg Hit http://repo.mongodb.org wheezy/mongodb-org/3.4/main amd64 Packages Hit https://packages.graylog2.org stable Release Hit https://packages.graylog2.org stable/2.2 amd64 Packages Ign http://repo.mongodb.org wheezy/mongodb-org/3.4/main Translation-en Ign https://packages.graylog2.org stable/2.2 Translation-en Reading package lists... Done root@vps404561:/etc/apt# apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@vps404561:/etc/apt# dpkg -C root@vps404561:/etc/apt#