在ubuntu中安装一些包的时候会出现次版本上的冲突,可以通过单独安装该包来解决。
例如
The following packages have unmet dependencies:
libldap2-dev : Depends: libldap-2.4-2 (= 2.4.42+dfsg-2ubuntu3) but 2.4.42+dfsg-2ubuntu3.2 is to be installed
E: Unable to correct problems, you have held broken packages.
可以通过等号指定包名命令来安装上:
sudo apt-get install libldap-2.4-2=2.4.42+dfsg-2ubuntu3
等号的作用,通过man apt-get得到的说明为:
DESCRIPTION
install
...
A specific version of a package can be selected for installation by
following the package name with an equals and the version of the
package to select. This will cause that version to be located and
selected for install. Alternatively a specific distribution can be
selected by following the package name with a slash and the version
of the distribution or the Archive name (stable, testing,
unstable).