Results 1 to 3 of 3

Thread: Building package from source isn't replacing default package

  1. #1
    Join Date
    Jun 2013
    Beans
    1

    Building package from source isn't replacing default package

    Hi,

    How do I replace the default version of a package in the default install of my distro (latest Ubuntu 32-bit server) with the latest version I've built from source?

    I've built from source a few packages using the standard ./configure or cmake, then make, then make install and yet although the build process seems to go perfectly in each case with no errors, the older default versions that came with Ubuntu are still being used by the system.

    Any ideas please?

    Further relevant details if needed:

    I'm installing something called Pango, which depends on another package Harfbuzz and also FontConfig. Ubuntu shipped with these. I downloaded and built later versions of each from source, yet checking the installed package afterwards with 'dpkg --get-selections' gives the older version.
    So a.) I am not sure Pango is being built with reference to the newer Harfbuzz and Fontconfig 've also built from source beforehand, or instead using the older versions that came with Ubuntu, and b.) my C program that I access Pango API with is I assume using older default Pango too (I just tell the gcc compiler to link with the 'pangocairo' library).

    For each package, I am building the source in /usr/local/bin/[package name]/
    and 'make install' is putting the compiled libs in /usr/local/lib
    I then tried copying compiled libs to /usr/lib but the older versions are still in Ubuntu's default location of /usr/lib/i386-linux-gnu/ - I could try deleting these and copying in the latest versions, but this seems messy - is there a cleaner solution or standard practice (I'm not sure what steps I'm missing out or other files/configs that need updating if I start manually copying!)

    Many thanks for any info.

    Alex

  2. #2
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Building package from source isn't replacing default package

    Hi and welcome to the forums!

    You can use checkinstall to install your compiled packages:
    community/CheckInstall

  3. #3
    Join Date
    Jan 2008
    Beans
    Hidden!
    Distro
    Kubuntu 13.04 Raring Ringtail

    Re: Building package from source isn't replacing default package

    Generally when you build from source, executables and libraries are put in directories which have precedence over those coming from packages.
    For eg: default binaries might go under /usr/lib, while what you compile might go under /usr/local/lib (based on the arguments to configure script)

    To confirm which library your program is using, you can do this:
    Code:
    ldd your-program

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •