Ubuntu 12.04 未满足的依赖关系

Ubuntu 12.04 未满足的依赖关系

我有一个运行 plesk 的 VPS,我想使用 nginx 网络服务器并更新 php 版本,但我相信当我尝试安装 nginx 时可能会与 plesk 发生某种冲突。

我尝试在命令行中执行此操作,但出现了问题,我不知道问题出在哪里或如何修复它。我认为它现在不允许我安装任何软件包?

root@:~# sudo add-apt-repository ppa:ondrej/php5-oldstable

sudo: add-apt-repository: command not found

root@:~# sudo apt-get install python-software-properties

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:
 nginx : Depends: nginx-full but it is not going to be installed or
                  nginx-light but it is not going to be installed
 python-software-properties : Depends: python-apt (>= 0.6.20ubuntu16) but it is not going to be installed
                              Depends: python-gnupginterface but it is not going to be installed
                              Depends: unattended-upgrades but it is not going to be installed
                              Depends: python-pycurl but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

root@:~# sudo 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 nginx-full
The following NEW packages will be installed:
  nginx-common nginx-full
0 upgraded, 2 newly installed, 0 to remove and 238 not upgraded.
1 not fully installed or removed.
Need to get 0 B/395 kB of archives.
After this operation, 1141 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 75011 files and directories currently installed.)
Unpacking nginx-common (from .../nginx-common_1.1.19-1ubuntu0.7_all.deb) ...
dpkg: error processing /var/cache/apt/archives/nginx-common_1.1.19-1ubuntu0.7_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/nginx.1.gz', which is also in package sw-nginx 1.5.0-1.13060711.ubuntu1204
Unpacking nginx-full (from .../nginx-full_1.1.19-1ubuntu0.7_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/nginx-full_1.1.19-1ubuntu0.7_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/nginx', which is also in package sw-nginx 1.5.0-1.13060711.ubuntu1204
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/nginx-common_1.1.19-1ubuntu0.7_all.deb
 /var/cache/apt/archives/nginx-full_1.1.19-1ubuntu0.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您的系统上有一个名为 的冲突软件包sw-nginx。请删除此软件包然后重试。

sudo apt-get purge sw-nginx

相关内容