0

Installing libboost-dev on Ubuntu 12.04:

System is offline due to unchangeable circumstances, so I have to download libraries and install manually using 'dpkg'.

Ubuntu package repository shows that libboost-dev for 12.04 is 1.48.0.2, and relies on "libboost1.46-dev"

I have another system, online, with identical setup, that I queried to find out which libboost-dev package is installed. This confirms the 1.48.02:

 ~$ dpkg -l libboost-dev
 Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                        Version                                     Description
+++-===========================================-===========================================-======================================================================================================
ii  libboost-dev                                1.48.0.2                                    Boost C++ Libraries development files (default version)

So I downloaded the two packages, copied them manually to the offline system,

libboost1.46-dev_1.46.1
libboost-dev_1.48.0.2

and tried to install:

~$ sudo dpkg -i libboost*
dpkg: considering removing libboost1.48-dev in favour of libboost1.46-dev ...
dpkg: no, cannot proceed with removal of libboost1.48-dev (--auto-deconfigure will help):
libboost-timer1.48-dev depends on libboost1.48-dev (= 1.48.0-3)
libboost1.48-dev is to be removed.
dpkg: regarding libboost1.46-dev_1.46.1-7ubuntu3_amd64.deb containing libboost1.46-dev:
libboost1.48-dev conflicts with libboost1.46-dev
libboost1.46-dev (version 1.46.1-7ubuntu3) is to be installed.
dpkg: error processing libboost1.46-dev_1.46.1-7ubuntu3_amd64.deb (--install):
conflicting packages - not installing libboost1.46-dev
(Reading database ... 217276 files and directories currently installed.)
Preparing to replace libboost-dev 1.48.0.2 (using libboost-dev_1.48.0.2_amd64.deb) ...
Unpacking replacement libboost-dev ...
dpkg: dependency problems prevent configuration of libboost-dev:
libboost-dev depends on libboost1.46-dev; however:
Package libboost1.46-dev is not installed.
dpkg: error processing libboost-dev (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libboost1.46-dev_1.46.1-7ubuntu3_amd64.deb
libboost-dev

'dpkg' first considers replacing what seems to be the installed 1.48, but then can't because so many things depends on it. It then says "libboost1.48-dev conflicts with libboost1.46-dev".

My online system shows that both packages are installed, but my offline system won't install, and that the package has only been unpacked:

 ~$ dpkg -l libboost-dev
 Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                        Version                                     Description
+++-===========================================-===========================================-======================================================================================================
iU  libboost-dev                                1.48.0.2                                    Boost C++ Libraries development files (default version)

What is wrong, that dpkg cannot install this?

0

I did some more poking around on this.

I don't know how (since this system is offline), but the libboost*1.48 packages were all installed in prohibiting the installation of the libboost1.46 packages (which are the 12.04 standard install).

As all I wanted were the standard install packages, I executed:

sudo dpkg -r libboost-*1.48.-dev
sudo dpkg -i libboost1.46-dev_1.46.1-7ubunut3_amd64.deb libboost-dev_1.48.0.2_amd64.deb

This completed the install successfully

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.