APT - "samba"パッケージのインストールの問題を解決する方法

APT -

sambaパッケージをインストールしようとしたDebian 3.16.39-1ときに実行すると、満たされていない依存関係エラーが発生します。

出力は次のとおりです。apt-get install samba

Reading package lists...
Building dependency tree...
Reading state information...
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:
 samba : Depends: heimdal-hdb-api-8 but it is not installable
         Depends: python-dnspython but it is not installable
         Depends: python-ntdb but it is not installable
         Depends: python-samba but it is not going to be installed
         Depends: samba-common-bin (= 2:4.2.14+dfsg-0+deb8u2) but it is not going to be installed
         Recommends: attr but it is not installable
         Recommends: samba-vfs-modules but it is not going to be installed

出力エラーは次のとおりです。

E: Unable to correct problems, you have held broken packages.

その行にコメントを付けて/etc/apt/sources.listの問題を追加しましたが、#deb cdrom ..samba-commonパッケージを正常にインストールできました。

source.listをバックアップして変更した後、次のコマンドを実行しました。

apt-get update
apt-get upgrade
apt-get autoclean
apt-get -f install

これは /etc/apt/sources.list の出力です:

    # 

# deb cdrom:[Debian GNU/Linux 8.7.1 _Jessie_ - Official amd64 DVD Binary-1 20170116-11:01]/ jessie contrib main

# deb cdrom:[Debian GNU/Linux 8.7.1 _Jessie_ - Official amd64 DVD Binary-1 20170116-11:01]/ jessie contrib main

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-updates main contrib
# deb-src http://ftp.debian.org/debian/ jessie-updates main contrib

しかし、残念ながら私はまだ同じ問題に直面しています。ご協力ありがとうございます。

ベストアンサー1

/etc/apt/sources.list次のように編集してください。

deb http://httpredir.debian.org/debian jessie main contrib
deb-src http://httpredir.debian.org/debian jessie main contrib

deb http://httpredir.debian.org/debian jessie-updates main contrib
deb-src http://httpredir.debian.org/debian jessie-updates main contrib

deb http://security.debian.org/ jessie/updates main contrib 
deb-src http://security.debian.org/ jessie/updates main contrib

次のコマンドを保存して実行します。

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

sudo apt-get install samba

おすすめ記事