Проблемы, устанавливающие NGINX на Ubuntu 16.04 AWS на новом VPC

Я вращал совершенно новую Ubuntu 16.04 VPC, и это было первым шагом, который я сделал согласно NGINX, "как" отправить найденный здесь на их веб-сайте. Я не сделал никаких других шагов перед этим после того, как я SSH'd в, но его предоставление мне сообщения об ошибках.

ubuntu@ip-172-31-8-90:/$ sudo wget http://nginx.org/keys/nginx_signing.key
--2017-07-01 05:57:39--  http://nginx.org/keys/nginx_signing.key
Resolving nginx.org (nginx.org)... 206.251.255.63, 95.211.80.227, 
2001:1af8:4060:a004:21::e3, ...
Connecting to nginx.org (nginx.org)|206.251.255.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1561 (1.5K) [text/plain]
Saving to: ‘nginx_signing.key’

nginx_signing.key                                  100%[================================================================================================================>]   1.52K  --.-KB/s    in 0s      

2017-07-01 05:57:40 (323 MB/s) - ‘nginx_signing.key’ saved [1561/1561]

ubuntu@ip-172-31-8-90:/$ sudo apt-key add nginx_signing.key
OK
ubuntu@ip-172-31-8-90:/$ sudo nano /etc/apt/sources.list

Добавленный source.list с

deb http://nginx.org/packages/ubuntu xenial nginx
deb-src http://nginx.org/packages/ubuntu xenial nginx

затем

ubuntu@ip-172-31-8-90:/$ sudo apt-get update
Hit:1 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://us-west-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://nginx.org/packages/ubuntu xenial InRelease                         
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 102 kB in 0s (136 kB/s)    
Reading package lists... Done
ubuntu@ip-172-31-8-90:/$ sudo apt-get install nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fontconfig-config fonts-dejavu-core libfontconfig1 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libtiff5 libvpx3 libxpm4 libxslt1.1 nginx-common nginx-core
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  nginx
1 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
Need to get 0 B/786 kB of archives.
After this operation, 2,777 kB of additional disk space will be used.
(Reading database ... 51251 files and directories currently installed.)
Preparing to unpack .../nginx_1.12.0-1~xenial_amd64.deb ...
Unpacking nginx (1.12.0-1~xenial) over (1.10.3-0ubuntu0.16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~xenial_amd64.deb (--unpack):
 trying to overwrite '/usr/share/nginx/html/index.html', which is also in package nginx-common 1.10.3-0ubuntu0.16.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/nginx_1.12.0-1~xenial_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
1
задан 1 July 2017 в 21:32

1 ответ

Решить Вашу выполненную проблему

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nginx_1.12.0-1~xenial_amd64.deb

проверьте, что все фиксируется путем выполнения:

sudo apt-get -f install
0
ответ дан 8 December 2019 в 04:48

Другие вопросы по тегам:

Похожие вопросы: