ubuntu换官方源apt安装nginx


ubuntu换官方源apt安装nginx
 
添加 可信任的key:
 
touch  ~/nginx_signing.key
1
sudo vi ~/nginx_signing.key
 
把官方提供的 key加进去,这里是key的 url
 
1
sudo apt-key add ~/nginx_signing.key
第二步
 
/etc/apt/sources.list file  末尾处 添加官方源
 
RHEL/CentOS:
 
Version
5.x
6.x
Debian:
 
Version Codename
6.x squeeze
7.x wheezy
Ubuntu:
 
Version Codename
10.04 lucid
11.10 oneiric
12.04 precise
12.10 quantal
13.04 raring 我的是12 .04 所以 选择 precise
deb http://nginx.org/packages/ubuntu/ precise nginx
deb-src http://nginx.org/packages/ubuntu/ precise nginx
 
第3 步
 
apt-get update
apt-get install nginx
 
 
但是 我安装 的时候 出现了这个版本冲突错误 。 
 
01
正在解压缩 nginx (从 .../nginx_1.4.3-1~precise_i386.deb) ...
02
----------------------------------------------------------------------
03
 
04
Thanks for using nginx!
05
 
06
Please find the official documentation for nginx here:
07
* http://nginx.org/en/docs/
08
 
09
Commercial subscriptions for nginx are available on:
10
* http://nginx.com/products/
11
 
12
----------------------------------------------------------------------
13
dpkg:处理 /var/cache/apt/archives/nginx_1.4.3-1~precise_i386.deb (--unpack)时出错:
14
 正试图覆盖 /usr/sbin/nginx,它同时被包含于软件包 nginx-full 1.1.19-1ubuntu0.2
15
由于已经达到 MaxReports 限制,没有写入 apport 报告。
16
                                                    dpkg-deb: error: subprocess 粘贴 was killed by signal (断开的管道)
17
在处理时有错误发生:
18
 /var/cache/apt/archives/nginx_1.4.3-1~precise_i386.deb
19
E: Sub-process /usr/bin/dpkg returned an error code (1)
仔细一想 原来我之前 换源之前 已经安装过 1.1.19 版本的, 没卸载干净
 
我之前 是直接 
 
apt-get remote nginx  进行卸载的
 
还有 nginx-common 和 nginx-full 没卸载 
 
 
sudo apt-get remote  nginx-full 
 
sudo apt-get autoremove 
 
卸载干净了
 
开始安装
 
sudo apt-get install nginx 
 
成功
 
 

相关内容

    暂无相关文章