我有一些问题我的操作系统,我不知道如何处理,我googled分配但没有成功,这是我的问题。 我想在我的Kali Debian操作系统中安装Linux头文件。我使用了以下命令,
$ apt-get install linux-headers-$(uname -r)
它的输出,
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:
linux-headers-3.18.0-kali3-amd64 : Depends: gcc-4.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
输入以下命令后,
$ apt-get install gcc-4.7
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:
gcc-4.7 : Depends: gcc-4.7-base (= 4.7.2-5) but it is not going to be installed
Depends: cpp-4.7 (= 4.7.2-5) but it is not going to be installed
Depends: libitm1 (>= 4.7.2-5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我也尝试过其他一些命令,包括以下命令,
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get -u dist-upgrade
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
以及关注aptitude命令,
sudo aptitude install linux-headers-$(uname -r)
我的系统信息,
$ cat /proc/version
Linux version 3.18.0-kali3-amd64 (debian-kernel@lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Debian 3.18.6-1~kali2 (2015-03-02)
$ uname -mrs
Linux 3.18.0-kali3-amd64 x86_64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Kali Linux 2.0~alpha1
Release: Kali Linux 2.0~alpha1
Codename: n/a
请指导我出了什么问题为什么我会遇到这个问题,谢谢。
答案 0 :(得分:0)
我分享我发现并为我工作的东西。
我的版本:
# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Kali Linux 1.1.0
Release: 1.1.0
Codename: moto
我的源列表(/etc/apt/sources.list):
# Line commented out by installer because it failed to verify:
deb http://security.kali.org/ kali/updates main contrib non-free
# Line commented out by installer because it failed to verify:
deb-src http://security.kali.org/ kali/updates main contrib non-free
## Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
并执行以下操作:
# apt-get clean
# apt-get update
# apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-headers-3.18.0-kali3-common linux-kbuild-3.18
The following NEW packages will be installed:
linux-headers-3.18.0-kali3-amd64 linux-headers-3.18.0-kali3-common linux-kbuild-3.18
0 upgraded, 3 newly installed, 0 to remove and 112 not upgraded.
Need to get 5,269 kB of archives.
After this operation, 34.7 MB of additional disk space will be used.
Do you want to continue [Y/n]?
我评论你说我遇到了这个问题,因为我错误地意识到了#34;分发升级"到了Kali的alpha版本。
希望得到这个帮助。