首页 > 代码库 > Ubuntu下apt-get安装文件提示:apt-get -f install
Ubuntu下apt-get安装文件提示:apt-get -f install
问题:
在通过apt-get安装内存测试工具lmbench的时候,出现如下错误:
apt-get install lmbench
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ‘apt-get -f install‘ to correct these:
The following packages have unmet dependencies:
mpt-status : Depends: daemon but it is not going to be
installed
Depends: mailx
E: Unmet dependencies. Try ‘apt-get -f install‘ with no packages
(or specify a solution).
诊断:
通过资料查找,发现可能是安装的其他软件包不兼容导致了,同时根据提示需要执行“apt-get -f install ”来卸载之前的冲突包。
还有个命令是:aptitude -f install
解决:
执行如下命令:
aptitude -f install
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not
upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The following packages have unmet dependencies:
mpt-status : Depends: daemon but it is not going to be
installed.
Depends: mailx which is a virtual package.
The following actions will resolve these dependencies:
Remove the following packages:
1) mpt-status
Accept this solution? [Y/n/q/?] y
Invalid response; please enter one of the following commands:
y: accept the proposed changes
n: reject the proposed changes and search for another solution
q: give up and quit the program
.: move to the next solution
,: move to the previous solution
o: toggle between the contents of the solution and an
explanation of the solution
e: examine the solution in the visual user interface
x: abort automatic dependency resolution; resolve dependencies
by hand instead
r (ID|pkg ver) ...: reject the given package versions; don‘t
display any solutions in which they occur. Enter UNINST instead
of a version to reject
removing the package. ID is the integer
printed to the left of the action.
a (ID|pkg ver) ...: accept the given package versions; display
only solutions in which they occur. Enter UNINST instead of a
version to accept
removing the package. ID is the integer
printed to the left of the action.
<ID>: display information about the action labeled ID from the
solution. The label is the integer printed to the left of the
action.
<ACTION> pkg... : adjust the state of the listed packages,
where ACTION is one of:
‘+‘ to install packages
‘+M‘ to install packages and immediately flag them as
automatically installed
‘-‘ to remove packages
‘_‘ to purge packages
‘=‘ to place packages on hold
‘:‘ to keep packages in their current state without placing
them on hold
‘&M‘ to mark packages as automatically installed
‘&m‘ to mark packages as manually installed
Accept this solution? [Y/n/q/?] y
The following packages will be REMOVED:
mpt-status{a}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not
upgraded.
Need to get 0 B of archives. After unpacking 89.1 kB will be
freed.
Do you want to continue? [Y/n/?] y
dpkg: warning: parsing file ‘/var/lib/dpkg/status‘ near line
13600 package ‘storcli‘:
missing maintainer
(Reading database ... 97017 files and directories currently
installed.)
Removing mpt-status (1.2.0-4.2.hwraid1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Current status: 0 broken [-1], 0 updates [-1].
再来执行apt-get install lmbench即可。
本文出自 “飞翔的猪” 博客,请务必保留此出处http://thinkpig007.blog.51cto.com/971471/1880908
Ubuntu下apt-get安装文件提示:apt-get -f install