
curl
依存関係の不一致の問題により、更新またはインストールできません。 (助けになりそうだし、取り外して再インストールしてみたけど役に立たなかった)
私のcurl
試み:
pi@RECOVERY:~ $ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
curl : Depends: libcurl3 (= 7.52.1-5+deb9u1) but 7.38.0-4+deb8u5 is to be installed
E: Unable to correct problems, you have held broken packages.
次に、依存関係の1つを試してください。
pi@RECOVERY:~ $ sudo apt-get install libcurl3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcurl3 : Depends: libgssapi-krb5-2 (>= 1.14+dfsg) but 1.12.1+dfsg-19+deb8u2 is to be installed
Depends: libnghttp2-14 (>= 1.12.0) but it is not installable
Depends: libpsl5 (>= 0.13.0) but it is not installable
Depends: libssh2-1 (>= 1.7.0) but 1.4.3-4.1+deb8u1 is to be installed
Depends: libssl1.0.2 (>= 1.0.2d) but it is not installable
E: Unable to correct problems, you have held broken packages.
私も試してみましたが、sudo apt-get update && sudo apt-get upgrade && sudo apt-get -f install
成功しませんでした。でもなくsudo apt-get purge
。
一部のサブ依存関係(例:libnghttp2-14
などlibpsl5
)が「インストールできません」と表示されます。これはこれに関連していますか?
この問題をどのように克服できますか?
- 編集する -
コメントでリクエストしたように、ここに私の結果/etc/apt/sources.list
と次の結果がありますapt-cache policy curl
。
ソース、リスト
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://security.debian.org stable/updates main
deb-src http://security.debian.org/ stable/updates main
適切なキャッシュ
pi@RECOVERY:~ $ apt-cache policy curl
curl:
Installed: (none)
Candidate: 7.52.1-5+deb9u1
Version table:
7.52.1-5+deb9u1 0
500 http://security.debian.org/ stable/updates/main armhf Packages
7.38.0-4+deb8u6 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
500 http://archive.raspbian.org/raspbian/ jessie/main armhf Packages
答え1
sources.list
Raspbian Jessieと「安定した」Debian(現在のStretch(Debian 9))が混在しているため、この問題が発生します。インストール時にRaspbian curl
Jessieの依存関係を使用してDebian 9にセキュリティアップデートをインストールしようとしましたcurl
が、そうではありません。働く。
この問題を解決するには、stable
次のように交換します。jessie
sources.list
deb http://security.debian.org jessie/updates main
deb-src http://security.debian.org jessie/updates main
完了したら実行するapt update
とcurl
。
安定したDebianリリースに従うときは、新しいバージョンがリリースされたときに突然バージョンが変わる可能性がある「stable」ではなく、常にバージョンコード名を使用する必要があります。
答え2
ディストリビューションにこれらの依存関係のリリース候補がない場合は、Debian リポジトリを /etc/apt/sources.list に追加し、依存関係を直接インストールできます。
提案に従ってくださいここ
/etc/apt/sources.listに次の行があることを確認してください。
deb-src http://ftp.debian.org/debian/ stable main non-free contrib
APTはこれらのdeb-srcライン(通常のバイナリdebラインの代わりに)を見つけ、ソースパッケージをダウンロードするための "apt-get source"コマンドを提供します。このチュートリアルでは、「apt-get source」に便利なラッパー「apt-src」を使用します。ステップ2
apt-get update
ステップ3
sudo aptitude install apt-src
apt-srcは、ソースコードパッケージを簡単にコンパイルできるようにするヘルパープログラムです。これは必須ではありませんが、あまりにも多くのコマンドを入力するのを防ぎます。ステップ4
apt-src -bi install $package
「libnghttp2-14」をインストールするには、次のコマンドを実行します。
apt-src -bi install libnghttp2-14
「b」は「build」を意味し、「i」は「生成されたパッケージのインストール」を意味し、「install」という用語は「sources.listからDebianソース行にあるアルパインソースをダウンロードする」という意味です。 apt-srcはソースコードを現在のディレクトリに「インストール」し、それをビルドするために必要なすべてのパッケージがあることを確認し(「ビルド依存関係を満たす」というプロセス)、それをビルドして結果の.debsをインストールします。