There’s to resolve problem and I have to apt-get upgrade otherwise my site might be die.
I totally didn’t notice this problem though.
$ sudo apt-get upgrade パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 これらを直すためには 'apt-get -f install' を実行する必要があるかもしれません。 以下のパッケージには満たせない依存関係があります: nginx : 依存: nginx-full (< 1.10.2-2~dotdeb+8.2.1~) しかし、1.10.3-1~dotdeb+8.1 はインストールされています または nginx-light (< 1.10.2-2~dotdeb+8.2.1~) しかし、インストールされていません または nginx-extras (< 1.10.2-2~dotdeb+8.2.1~) しかし、インストールされていません E: 未解決の依存関係があります。-f オプションを試してください。
First I tried this case how to resolve.
$ dpkg --get-selections | grep nginx | awk '{print $1}' | xargs -I % echo % hold | sudo dpkg --set-selections
$ dpkg --get-selections | grep nginx
libnginx-mod-http-auth-pam hold
libnginx-mod-http-geoip hold
libnginx-mod-http-image-filter hold
libnginx-mod-http-xslt-filter hold
libnginx-mod-mail hold
libnginx-mod-stream hold
nginx hold
nginx-common hold
nginx-full hold
BUT, this way wasn’t resolve this problem.Orz
Don’t forget restore config file.
$ dpkg --get-selections | grep nginx libnginx-mod-http-auth-pam install libnginx-mod-http-geoip install libnginx-mod-http-image-filter install libnginx-mod-http-xslt-filter install libnginx-mod-mail install libnginx-mod-stream install nginx install nginx-common install nginx-full install
Actually We have a method that is to resolve a problem.
Let’s me show you apt-cache policy.
$ apt-cache policy nginx
nginx:
インストールされているバージョン: 1.10.2-2~dotdeb+8.2
候補: 1.10.3-1~jessie
パッケージ Pin: 1.10.3-1~jessie
バージョンテーブル:
1.10.3-1~jessie 1001
500 http://nginx.org/packages/debian/ jessie/nginx amd64 Packages
1.10.3-1~dotdeb+8.1 1001
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
*** 1.10.2-2~dotdeb+8.2 1001
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
100 /var/lib/dpkg/status
1.10.2-2~dotdeb+8.1 1001
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
1.10.2-1~jessie 1001
500 http://nginx.org/packages/debian/ jessie/nginx amd64 Packages
1.10.2-1~dotdeb+8.1 1001
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
As you can see, default repository is the highest position in this file.
I need write this file to success apt-get upgrade and resolve dependence.
cat /etc/apt/preferences.d/nginx Package: nginx Pin: origin packages.dotdeb.org Pin-Priority: 999
It’s like this, I can write config file for apt.
Let’s me show you apt-cache policy again.
$ apt-cache policy nginx
nginx:
インストールされているバージョン: 1.10.2-2~dotdeb+8.2
候補: 1.10.3-1~dotdeb+8.1
パッケージ Pin: 1.10.3-1~dotdeb+8.1
バージョンテーブル:
1.10.3-1~jessie 999
500 http://nginx.org/packages/debian/ jessie/nginx amd64 Packages
1.10.3-1~dotdeb+8.1 999
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
*** 1.10.2-2~dotdeb+8.2 999
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
100 /var/lib/dpkg/status
1.10.2-2~dotdeb+8.1 999
500 http://packages.dotdeb.org/ jessie/all amd64 Packages
1.10.2-1~jessie 999
500 http://nginx.org/packages/debian/ jessie/nginx amd64 Packages
dotdeb is having file priority have changed from low to high.
$ sudo apt-get -f install パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 依存関係を解決しています ... 完了 以下の追加パッケージがインストールされます: nginx 以下のパッケージはアップグレードされます: nginx アップグレード: 1 個、新規インストール: 0 個、削除: 0 個、保留: 2 個。
Succeeded!!
Sorry, language’s settings in my os is Japanese..