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

gec@ubuntu:~/mt7601u$ sudo apt-get install linux-headers-generic  build-essential gcc dkms  wireless-tools iw dhcp3-server
Reading package lists... Done
Building dependency tree      
Reading state information... Done

gcc is already the newest version.
iw is already the newest version.
wireless-tools is already the newest version.
build-essential is already the newest version.                这四个都是最新版的

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:
 dhcp3-server : Depends: isc-dhcp-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


问题原因:安装dhcp3-server存在依赖关系,先安装isc-dhcp-server

解决问题过程:sudo apt-get install isc-dhcp-server
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:
 isc-dhcp-server : Depends: isc-dhcp-common (= 4.1.ESV-R4-0ubuntu5) but 4.1.ESV-R4-0ubuntu5.6 is to be installed
E: Unable to correct problems, you have held broken packages.

问题原因:版本不合适

我就直接把isc-dhcp-common卸载了,isc-dhcp-server也不装了,直接装dhcp3-server
Ubuntu会自动把依赖都装上,之前安装不上是有其他版本的东东,需要弄干净。

gec@ubuntu:~/mt7601u$ sudo apt-get remove isc-dhcp-common
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED:
  isc-dhcp-client isc-dhcp-common network-manager network-manager-gnome
  ubuntu-minimal
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 4,940 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 189299 files and directories currently installed.)
Removing ubuntu-minimal ...
Removing network-manager-gnome ...
Removing network-manager ...
network-manager stop/waiting
Removing isc-dhcp-client ...
Removing isc-dhcp-common ...
Processing triggers for gconf2 ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Processing triggers for ureadahead ...
gec@ubuntu:~/mt7601u$ sudo apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnl-route-3-200 usb-modeswitch-data iputils-arping usb-modeswitch
  libsysfs2 modemmanager
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  isc-dhcp-common isc-dhcp-server
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  dhcp3-server isc-dhcp-common isc-dhcp-server
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 774 kB of archives.
After this operation, 1,787 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ubuntu.cn99.com/ubuntu/ precise/main isc-dhcp-common i386 4.1.ESV-R4-0ubuntu5 [345 kB]
Get:2 http://ubuntu.cn99.com/ubuntu/ precise/main isc-dhcp-server i386 4.1.ESV-R4-0ubuntu5 [426 kB]
Get:3 http://ubuntu.cn99.com/ubuntu/ precise/universe dhcp3-server all 4.1.ESV-R4-0ubuntu5 [2,634 B]
Fetched 774 kB in 1s (689 kB/s)    
Preconfiguring packages ...
Selecting previously unselected package isc-dhcp-common.
(Reading database ... 189093 files and directories currently installed.)
Unpacking isc-dhcp-common (from .../isc-dhcp-common_4.1.ESV-R4-0ubuntu5_i386.deb) ...
Selecting previously unselected package isc-dhcp-server.
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.ESV-R4-0ubuntu5_i386.deb) ...
Selecting previously unselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.ESV-R4-0ubuntu5_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...

Setting up isc-dhcp-common (4.1.ESV-R4-0ubuntu5) ...
Setting up isc-dhcp-server (4.1.ESV-R4-0ubuntu5) ...     这里把依赖都装上了

Generating /etc/default/isc-dhcp-server...
isc-dhcp-server start/running, process 18983
isc-dhcp-server6 stop/waiting
Setting up dhcp3-server (4.1.ESV-R4-0ubuntu5) ... 

你可能感兴趣的:(安装与配置)