Ubuntu:无法修复问题,您有被锁定的损坏软件包
我在安装这个的时候,出现了“无法修复问题,你有一些损坏的包”的错误信息。
Apache版本
服务器版本:Apache/2.4.2(Ubuntu)
服务器构建时间:2012年6月27日 07:23:35
# aptitude install libapache2-mod-wsgi
The following NEW packages will be installed:
apache2.2-common{ab} libapache2-mod-wsgi
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 299 kB of archives. After unpacking 1,047 kB will be used.
The following packages have unmet dependencies:
apache2 : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
apache2.2-common : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.5) but it is not going to be installed.
Depends: apache2-utils but it is not going to be installed.
apache2-bin : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
apache2-data : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) apache2.2-common [Not Installed]
2) libapache2-mod-wsgi [Not Installed]
Accept this solution? [Y/n/q/?] Y
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.
任何帮助都很感激
4 个回答
0
我遇到的问题是,我在进行静默安装时使用了 -qq
这个选项。把这个选项关掉后,我就看到了依赖性的问题。
2
这段话的意思是,这个方法可以解决在使用虚拟环境(virtualenv)时遇到的pip和wheel错误代码1的问题,还有找不到软件包(E unable to locate package)的问题。
sudo apt-get update
sudo apt-get install python-software-properties
sudo apt-get install apt-file
sudo apt-file update
sudo apt-get install software-properties-common
sudo apt-get install <your filename>
3
我也遇到了同样的问题,想用 sudo apt-get install npm 来安装。
我试过
sudo apt-get remove npm
sudo apt-get remove nodejs
然后
sudo apt-get clean
sudo apt-get autoclean
接着 sudo apt-get install nodejs sudo apt-get install npm
这样就解决了我的问题!
14
选项 1:你可以试试:
sudo apt-get upgrade
这个“升级”选项会尝试解决已安装软件包中的所有依赖关系。通常,这样就足够解决损坏的软件包问题了。
选项 2:如果你的软件包是从“deb”文件安装的,而不是从软件源安装的,可能你现在要安装的新版本和之前的版本发生了冲突,因此你需要先删除旧版本的软件包。你可以通过软件中心来操作,或者直接使用:
sudo apt-get remove libapache2-mod-wsgi
sudo apt-get clean
sudo apt-get autoclean
然后
sudo apt-get update
sudo apt-get install libapache2-mod-wsgi
希望这能帮到你!