Reputation: 673
Developing on linux is new for me, and I'm having trouble setting up the environment. I have a relatively small program which relies on the following libs:
-lboost_date_time -lboost_regex -lmysqlclient -lmysqlcppconn -lexpat
I'm using eclipse on Ubuntu 12.04 LTS. What do I need to do with the package manager, and inside eclipse to successfully compile? I was told to use sudo apt-get libboost*
, but that prints a whole army of conflicts and then comes to the saddening conclusion:
E: Unable to correct problems, you have held broken packages.
I believe I installed libmysqlcppconn-dev
, and libexpat1-dev
correctly.
The only thing I've done in eclipse, is added the -l stuff to the linkers library settings.
So in conclusion, the OS and the IDE are both new to me, I would appreciate detailed help.
Dump from the terminal below:
libboost-dev is already the newest version.
libboost-iostreams1.46.1 is already the newest version.
libboost-iostreams1.46.1 set to manually installed.
libboost-serialization1.46.1 is already the newest version.
libboost-serialization1.46.1 set to manually installed.
libboost1.46-dev is already the newest version.
libboost1.46-dev set to manually installed.
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:
libboost-date-time1.48-dev : Conflicts: libboost-date-time1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-filesystem1.48-dev : Conflicts: libboost-filesystem1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-graph-parallel1.48-dev : Conflicts: libboost-graph-parallel1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-graph1.48-dev : Conflicts: libboost-graph1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-iostreams1.48-dev : Conflicts: libboost-iostreams1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-math1.48-dev : Conflicts: libboost-math1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-mpi-python1.48-dev : Conflicts: libboost-mpi-python1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-mpi-python1.48.0 : Conflicts: libboost-mpi-python1.46.1 but 1.46.1-7ubuntu3 is to be installed
libboost-mpi1.48-dev : Conflicts: libboost-mpi1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-program-options1.48-dev : Conflicts: libboost-program-options1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-python1.46-dev : Depends: python-dev but it is not going to be installed
libboost-python1.48-dev : Depends: python-dev but it is not going to be installed
Conflicts: libboost-python1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-regex1.48-dev : Conflicts: libboost-regex1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-serialization1.48-dev : Conflicts: libboost-serialization1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-signals1.48-dev : Conflicts: libboost-signals1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-system1.48-dev : Conflicts: libboost-system1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-test1.48-dev : Conflicts: libboost-test1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-thread1.48-dev : Conflicts: libboost-thread1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost-wave1.48-dev : Conflicts: libboost-wave1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost1.48-dbg : Conflicts: libboost1.46-dbg but 1.46.1-7ubuntu3 is to be installed
libboost1.48-dev : Conflicts: libboost1.46-dev but 1.46.1-7ubuntu3 is to be installed
libboost1.48-doc : Conflicts: libboost1.46-doc but 1.46.1-7ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.
Upvotes: 2
Views: 2792
Reputation: 14730
libboost-dev
is a virtual package pointing to the latest boost development package set deployed in the repository. At the moment, for your version of ubuntu, it seems like 1.48.02 is the latest (see the package description). There may be other versions available in the repositories, as for instance 1.46, which seems to be the one which was available at 12.04 release time.
When launching :
apt-get install liboost*
the package manager will try to install every package whose name starts with libboost
, not just the latest version. What you really want is to install only one set of dev packages (and all the runtime ones you may need for your apps, but this will be taken care of by the dependency tracker of apt
).
the following command:
apt-get update
apt-get install libboost-dev
or
aptitude install libboost-dev
should upgrade your system to the latest version available of the boost dev package.
Upvotes: 3