root@ubuntus:~# apt-get remove nginx-light Reading package lists... Done Building dependency tree Reading state information... Done Package nginx-light is not installed, so not removed You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: nginx-full: Depends: nginx-common (= 1.0.5-1ppa2~lucid) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
如何解决?
更新:
root@tftc:~# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: nginx-common The following NEW packages will be installed: nginx-common 0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded. 2 not fully installed or removed. Need to get 0B/60.6kB of archives. After this operation, 246kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 62634 files and directories currently installed.) Unpacking nginx-common (from .../nginx-common_1.0.5-1ppa2~lucid_all.deb) ... dpkg: error processing /var/cache/apt/archives/nginx-common_1.0.5-1ppa2~lucid_all.deb (--unpack): trying to overwrite '/etc/ufw/applications.d/nginx', which is also in package nginx 0:1.0.5-1ppa2~lucid Processing triggers for man-db ... Processing triggers for ureadahead ... Processing triggers for ufw ... Errors were encountered while processing: /var/cache/apt/archives/nginx-common_1.0.5-1ppa2~lucid_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
你搞乱了你的软件包仓库,破坏了你的系统。 所以你必须按顺序发布来解决它:
apt-get update apt-get upgrade apt-get install nginx-common apt-get remove nginx-full
在每一步仔细阅读信息,并按照给出的指示。
编辑:我说的依然如此。 你真的搞砸了你的设置。 强制安装永远不是一个好主意。 您试图安装不适合您的系统的软件包,然后强制另一个版本号的安装。 而我不知道你强制安装/更新/删除的其他软件包。 ( 2 not fully installed or removed.是一件坏事。)所以我会尝试
apt-get remove nginx-common nginx-full apt-get purge nginx-common nginx-full apt-get -f install
下次在安装其他Ubuntu / Debian版本的软件包之前,请三思。
我只是“转载”了这个问题:
apt-get update和apt-get upgrade 修正:
/etc/apt/sources.list.d/...注释掉了这行) apt-get purge nginx nginx-full nginx-common – 现在成功了 apt-get update , apt-get install nginx