我正在尝试安装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