2016-09-10 45 views
0

我更新了我的nginx 1.6.2從到1.10.1通過addding此行我sources.listnginx的更新到1.10.1緩存模塊

deb http://nginx.org/packages/debian/ jessie nginx 
deb-src http://nginx.org/packages/debian/ jessie nginx` 

但我想安裝nginx-fullnginx-extras緩存模塊。

所以我在終端輸入apt-get install nginx-full

但我得到這個錯誤:

[email protected]:~# apt-get install nginx-full 
Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
The following packages were automatically installed and are no longer required: 
libluajit-5.1-2 libluajit-5.1-common libperl5.20 
Use 'apt-get autoremove' to remove them. 
The following extra packages will be installed: 
nginx-common 
Suggested packages: 
fcgiwrap nginx-doc 
The following NEW packages will be installed: 
nginx-common nginx-full 
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 
Need to get 0 B/517 kB of archives. 
After this operation, 1,309 kB of additional disk space will be used. 
Do you want to continue? [Y/n] Y 
(Reading database ... 47948 files and directories currently installed.) 
Preparing to unpack .../nginx-common_1.6.2-5+deb8u2_all.deb ... 
Unpacking nginx-common (1.6.2-5+deb8u2) ... 
dpkg: error processing archive /var/cache/apt/archives/nginx-common_1.6.2-5+deb8      u2_all.deb (--unpack): 
trying to overwrite '/usr/share/nginx/html/index.html', which is also in package nginx 1.10.1-1~jessie 
Preparing to unpack .../nginx-full_1.6.2-5+deb8u2+b1_amd64.deb ... 
Unpacking nginx-full (1.6.2-5+deb8u2+b1) ... 
dpkg: error processing archive /var/cache/apt/archives/nginx-full_1.6.2-5+deb8u2      +b1_amd64.deb (--unpack): 
trying to overwrite '/usr/sbin/nginx', which is also in package nginx 1.10.1-1~      jessie 
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) 
Errors were encountered while processing: 
/var/cache/apt/archives/nginx-common_1.6.2-5+deb8u2_all.deb 
/var/cache/apt/archives/nginx-full_1.6.2-5+deb8u2+b1_amd64.deb 
E: Sub-process /usr/bin/dpkg returned an error code (1) 

我能做些什麼?

+0

你能否澄清一下'cache'模塊是什麼意思? – VBart

回答

0

nginx.org存儲庫中沒有nginx-full包。如果你想從Debian倉庫安裝它,你應該首先刪除nginx包。

+0

那麼如何安裝緩存模塊? fastcgi緩存模塊 – aTastyCoookie

+0

'nginx:[emerg]未知指令「fastcgi_cache_purge」in/etc/nginx/sites-enabled /' 我得到這個錯誤 – aTastyCoookie

+0

@aTastyCoookie根據[the documentation](http://nginx.org/ en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_purge)此指令僅在商業版本的nginx中可用。 – VBart