Hi,
i added the nginx repo to my source.list
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx
After this i did a sudo apt-get update and a sudo apt-get clean && sudo apt-get install nginx
but i get the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.13.0-61 linux-headers-3.13.0-61-generic
linux-headers-3.13.0-62 linux-headers-3.13.0-62-generic
linux-headers-3.13.0-63 linux-headers-3.13.0-63-generic
linux-image-3.13.0-61-generic linux-image-3.13.0-62-generic
linux-image-3.13.0-63-generic linux-image-extra-3.13.0-61-generic
linux-image-extra-3.13.0-62-generic linux-image-extra-3.13.0-63-generic
nginx-common nginx-full
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/426 kB of archives.
After this operation, 1093 kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "de_DE.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 191862 files and directories currently installed.)
Preparing to unpack .../nginx_1.9.5-1~trusty_amd64.deb ...
Unpacking nginx (1.9.5-1~trusty) over (1.8.0-1+trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.9.5-1~trusty_amd64.deb (--unpack):
trying to overwrite '/usr/share/nginx/html/index.html', which is also in package nginx-common 1.8.0-1+trusty1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.9.5-1~trusty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
forge@hostianer:~$ sudo nano /etc/apt/sources.list
My current nginx version is nginx/1.8.0
How can i solve this problem and update to the latest http2 nginx version?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The issue is with the apt-get clean command being issued after apt-get update and before apt-get install nginx. What is happening is you are updating your package cache then clearing it out again before you install NGINX.
This should work below.
sudo apt-get update && sudo apt-get install -y nginx
first get your language settings right, this should work:
sudo nano /etc/default/locale
add this line at the bottom:
LC_ALL="en_US.UTF-8"
(or use “de_DE” if you prefer this) then reboot and repeat your installation procedure
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.