我正在尝试安装几个开发包,但一直遇到障碍,这是最新的一个:
khishman@khishman-desktop:~/dev/powertab/build$ sudo aptitude install qtbase5-dev libboost-date-time-dev libboost-filesystem-dev libboost-iostreams-dev
The following NEW packages will be installed:
libboost-date-time-dev libboost-date-time1.58-dev{ab} libboost-filesystem-dev libboost-filesystem1.58-dev{ab} libboost-iostreams-dev libboost-iostreams1.58-dev{ab} libboost-system1.58-dev{ab} libqt5concurrent5{a}
libqt5opengl5-dev{ab} qt5-qmake{a} qtbase5-dev{b} qtbase5-dev-tools{a}
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,362 kB of archives. After unpacking 23.3 MB will be used.
The following packages have unmet dependencies:
libqt5opengl5-dev : Depends: libqt5opengl5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
libboost-date-time1.58-dev : Depends: libboost-date-time1.58.0 (= 1.58.0+dfsg-5ubuntu3) but 1.58.0+dfsg-5ubuntu3.1 is installed.
libboost-filesystem1.58-dev : Depends: libboost-filesystem1.58.0 (= 1.58.0+dfsg-5ubuntu3) but 1.58.0+dfsg-5ubuntu3.1 is installed.
libboost-iostreams1.58-dev : Depends: libboost-iostreams1.58.0 (= 1.58.0+dfsg-5ubuntu3) but 1.58.0+dfsg-5ubuntu3.1 is installed.
qtbase5-dev : Depends: libqt5core5a (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5dbus5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5gui5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5network5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5printsupport5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5sql5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5test5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5widgets5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5xml5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
libboost-system1.58-dev : Depends: libboost-system1.58.0 (= 1.58.0+dfsg-5ubuntu3) but 1.58.0+dfsg-5ubuntu3.1 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libboost-date-time-dev [Not Installed]
2) libboost-date-time1.58-dev [Not Installed]
3) libboost-filesystem-dev [Not Installed]
4) libboost-filesystem1.58-dev [Not Installed]
5) libboost-iostreams-dev [Not Installed]
6) libboost-iostreams1.58-dev [Not Installed]
7) libboost-system1.58-dev [Not Installed]
8) libqt5opengl5-dev [Not Installed]
9) qtbase5-dev [Not Installed]
Leave the following dependencies unresolved:
10) qtbase5-dev recommends libqt5opengl5-dev (= 5.5.1+dfsg-16ubuntu7)
Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.
例如,似乎软件包对次要版本号不一致
Depends: libqt5opengl5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed
16ubuntu7
似乎是在和之间发生冲突,16ubuntu7.2
而
Depends: libboost-iostreams1.58.0 (= 1.58.0+dfsg-5ubuntu3) but 1.58.0+dfsg-5ubuntu3.1 is installed.
似乎5ubuntu3
和5ubuntu3.1
如果你没有注意到我使用的是aptitude
而不是apt-get
。切换是为了克服类似的障碍(“...但它不会被安装”,“你持有损坏的软件包”障碍),我尝试了sudo apt-get autoremove
和sudo apt-get install -f
以防万一。我还确保删除了所有unofficial
ppa
khishman@khishman-desktop:/etc/apt$ find ./ -name *.list -exec grep -E "^[\s]*deb" {} \;
deb http://ca.archive.ubuntu.com/ubuntu/ xenial main
deb http://ca.archive.ubuntu.com/ubuntu/ xenial universe
deb http://security.ubuntu.com/ubuntu xenial-security main
deb http://security.ubuntu.com/ubuntu xenial-security universe
但没有运气。
任何帮助将不胜感激。
答案1
我最终拒绝了 aptitude 的第一个解决方案,第二个解决方案是将大多数依赖项降级为早期版本(从16ubunt7.2
降到16ubuntu7
并5ubuntu3.1
降到5ubuntu3
)。我不确定这是否是正确的做法,但我确实实现了我的目标。
khishman@khishman-desktop:/etc/apt$ sudo aptitude install qtbase5-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-iostreams-dev
libboost-dev is already installed at the requested version (1.58.0.1ubuntu1)
libboost-dev is already installed at the requested version (1.58.0.1ubuntu1)
The following NEW packages will be installed:
libboost-date-time-dev libboost-date-time1.58-dev{ab} libboost-filesystem-dev libboost-filesystem1.58-dev{ab} libboost-iostreams-dev libboost-iostreams1.58-dev{ab} libboost-regex1.58-dev{ab} libboost-serialization1.58-dev{ab}
libboost-serialization1.58.0{a} libboost-system1.58-dev{ab} libqt5concurrent5{a} libqt5opengl5-dev{ab} qt5-qmake{a} qtbase5-dev{b} qtbase5-dev-tools{a}
0 packages upgraded, 15 newly installed, 0 to remove and 14 not upgraded.
Need to get 3,944 kB of archives. After unpacking 29.4 MB will be used.
The following packages have unmet dependencies:
libqt5opengl5-dev : Depends: libqt5opengl5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
libboost-date-time1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
libboost-regex1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
Depends: libboost-regex1.58.0 (= 1.58.0+dfsg-5ubuntu3.1) but it is not going to be installed.
libboost-serialization1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
libboost-filesystem1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
libboost-iostreams1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
qtbase5-dev : Depends: libqt5core5a (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5dbus5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5gui5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5network5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5printsupport5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5sql5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5test5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5widgets5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
Depends: libqt5xml5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed.
libboost-system1.58-dev : Depends: libboost1.58-dev (= 1.58.0+dfsg-5ubuntu3.1) but 1.58.0+dfsg-5ubuntu3 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libboost-date-time-dev [Not Installed]
2) libboost-date-time1.58-dev [Not Installed]
3) libboost-filesystem-dev [Not Installed]
4) libboost-filesystem1.58-dev [Not Installed]
5) libboost-iostreams-dev [Not Installed]
6) libboost-iostreams1.58-dev [Not Installed]
7) libboost-regex1.58-dev [Not Installed]
8) libboost-serialization1.58-dev [Not Installed]
9) libboost-system1.58-dev [Not Installed]
10) libqt5opengl5-dev [Not Installed]
11) qtbase5-dev [Not Installed]
Leave the following dependencies unresolved:
12) qtbase5-dev recommends libqt5opengl5-dev (= 5.5.1+dfsg-16ubuntu7)
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Install the following packages:
1) libboost-date-time1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
2) libboost-filesystem1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
3) libboost-iostreams1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
4) libboost-regex1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
5) libboost-regex1.58.0 [1.58.0+dfsg-5ubuntu3 (xenial)]
6) libboost-serialization1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
7) libboost-serialization1.58.0 [1.58.0+dfsg-5ubuntu3 (xenial)]
8) libboost-system1.58-dev [1.58.0+dfsg-5ubuntu3 (xenial)]
Downgrade the following packages:
9) libboost-date-time1.58.0 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
10) libboost-filesystem1.58.0 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
11) libboost-filesystem1.58.0:i386 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
12) libboost-iostreams1.58.0 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
13) libboost-system1.58.0 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
14) libboost-system1.58.0:i386 [1.58.0+dfsg-5ubuntu3.1 (now) -> 1.58.0+dfsg-5ubuntu3 (xenial)]
15) libqt5core5a [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
16) libqt5dbus5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
17) libqt5gui5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
18) libqt5network5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
19) libqt5opengl5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
20) libqt5printsupport5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
21) libqt5sql5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
22) libqt5test5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
23) libqt5widgets5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
24) libqt5xml5 [5.5.1+dfsg-16ubuntu7.2 (now) -> 5.5.1+dfsg-16ubuntu7 (xenial)]
Accept this solution? [Y/n/q/?] Y