Question
Error while trying to upgrade nginx
I am trying to upgrade NGINX to the latest stable but keep getting this error:
Preparing to unpack .../nginx_1.8.0-1~trusty_amd64.deb ...
Unpacking nginx (1.8.0-1~trusty) over (1.4.6-1ubuntu3.3) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.8.0-1~trusty_amd64.deb (--unpack):
trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.4.6-1ubuntu3.3
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.8.0-1~trusty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I hav tried to upgrade to the mainline also but same errror. What am I missing?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Hi,
Can you let us know what these commands return?
returned nothing
returned:
returned:
Hi,
Can you try
which will attempt to overwrite the specific file that failed.
You could also do
--force-all
insteadI got this error now:
Ah, ok, sorry. Let’s try
sudo dpkg -i --force-overwrite /var/cache/apt/archives/nginx_1.8.0-1~trusty_amd64.deb
You may also want to try uninstalling with –purge first, as the third party repo with the newer Nginx build may not have the common package split out.
It worked but now PHP won’t be read… Hmmm
I am only getting a white screen now… I can not figure out what the problem is at the moment… I think that the latest nginx does not work with the latest php5-fpm? Do you have any idea on what is going on here?
I’m not sure. On my end I am still using the version that ships with Ubuntu 14.04. Are you seeing anything in the logs for either Nginx or PHP?
Hi,
I faced similar error as damlr and I followed everything BrookDo mentioned. I am getting a white screen now. Can you tell me where to look now or how to debug the problem?
Hi I solved the problem almost instantly after my report regarding the blank page!
The problem is in the config files. Make sure that the correct site is active and not the deafult NGINX welcome site! Check the paths!
This works for me.
The issue of the whitescreen problem is that
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
needs to be added to thefastcgi_params
file.