dpkg-deb:错误:子进程粘贴被信号杀死(管道断开)nginx


21

软件最新选项会自动下载的升级nginx。但是在安装时会出现以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nginx
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/434 kB of archives.
After this operation, 977 kB of additional disk space will be used.
(Reading database ... 291344 files and directories currently installed.)
Unpacking nginx (from .../nginx_1.4.7-1~precise_amd64.deb) ...
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* http://nginx.org/en/docs/

Commercial subscriptions for nginx are available on:
* http://nginx.com/products/

----------------------------------------------------------------------
dpkg: error processing /var/cache/apt/archives/nginx_1.4.7-1~precise_amd64.deb (--unpack):
 trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.4.6-1+precise0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nginx_1.4.7-1~precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

实际上,该文件/etc/logrotate.d/nginx在该文件夹中不存在。

Answers:


38

在终端上运行以下命令,

sudo dpkg -P nginx-common
sudo apt-get install -f

如果在卸载上述nginx-common软件包时显示任何依赖性问题,请清除 nginx-common软件包及其依赖性。

sudo apt-get purge nginx*

在运行上述命令之前,请不要忘记检查将与nginx一起清除的依赖包。

sudo apt-get purge -s nginx*

发表sudo apt-get purge -s nginx*您的问题的输出。
阿维纳什·拉吉2014年

我已经清除了整个nginx并重新安装了它。实际上,它对我有帮助。
zay7sev 2014年

是的,这就是我要说的。
Avinash Raj

如果您在WSL(Windows子系统ubuntu)上获得此权限,请使用管理员权限重新启动bash,它应予以修复。
尼克-
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.