Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have Ubuntu 14.04 upgraded from 12.04 making dist-upgrades. I did many manual installations such as ffmpeg, libglib and so on, in the past. I have a nice custom distro now, it works well but I have problems while trying to compile applications. The errors I got taught me lots, I found how to deal with linker errors, I list some of them below:







I come to such a point that even I can get errors while compiling native Ubuntu applications such as unity (I want to embed unity launcher into cairo dock unity launcher in cairo dock)

How can I fix those library conflicts? I lost manually compiled application's directories so I have no chance to run make uninstall.

I am fed up with adjusting library paths. What do you suggest me in this position?

share|improve this question
Hopefully, the manual installations you did were in the /usr/local prefix. You could try removing everything in the bin, lib, etc. folders. (Don't remove the folders themselves.) –  saiarcot895 Jul 15 '14 at 14:45
Build packages of the versions you want to install. You can probably use something like checkinstall to simplify things, but this way you can avoid at least side conflicts and use them like the official packages. –  muru Jul 15 '14 at 15:44
@saiarcot895 Thank you for suggestion but I didn't get what you meant. If I remove everything in those directories how can I reinstall them? –  kenn Jul 15 '14 at 19:06
@kenn: FFMpeg is in the repos and is now avconv in Trusty and libglib is in the libglib2.0-0 package, with development headers in libglib2.0-dev. There's a good chance that the packages and libraries you want are in the main repos and that you don't need to compile them. As you just discovered, if you decide to compile your own version and have it not managed by apt/dpkg, you will have to recompile it as library versions and SONAMEs change. –  saiarcot895 Jul 15 '14 at 19:34
@saiarcot895 I followed this guide to install ffmpeg but it didn't fix library conflict Then I used this repo, unfortunately the result is the same. Somehow linker uses old libraries. Here is the issue I got while compiling Simple Screen Recorder –  kenn Jul 15 '14 at 19:50

1 Answer 1

up vote 1 down vote accepted

The main issue here was the existence of libraries and includes in /usr/local that were compiled in Precise (12.04).

When searching for the development headers specified by #include, gcc and g++ have /usr/local/include higher on the list than /usr/include. Therefore, if you have a library's dev headers in both /usr/local/include and /usr/include, then the one in /usr/local/include will be used, regardless of the version. While this may have been fine in Precise, since the libraries that were locally compiled were likely newer versions, this wouldn't be fine in Trusty, when the system version of the library would be of a equal or newer version of the library you installed. In addition, as system libraries changed, the SONAMEs would have changed, and locally-compiled libraries would have to be recompiled. Therefore, gcc/g++ would use the older version and may complain about missing symbols and/or linking errors.

If a library is present in the main repos, it is generally recommended to use that library instead of compiling it by yourself (unless you need a newer version of a library for either development or to fix a bug); that way, when you upgrade your system, that library is updated as well, and recompiled to link correctly with the other libraries.

share|improve this answer
Thank you for the info. I simply renamed usr/local to /usr/local.old and it did the trick. –  kenn Jul 16 '14 at 15:01
WARNING renaming /usr/local folder to /usr/local.old works but it fails to boot. I used live USB to rename /usr/local.old/ back –  kenn Jul 17 '14 at 8:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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