Search code examples
linuxamazon-linux-2

What is the proper location to build packages from source to on a 64 bit Amazon Linux 2 instance?


I am having a similar problem to No package 'gdk-pixbuf-2.0' found. However, after installing gdk-pixbuf-2.0, it does not appear in the results of pkg-config--list-all at all. Here are the relevant environment variables:

PKG_CONFIG_PATH: /usr/lib/pkgconfig
LDFLAGS: -L/usr/lib
LD_LIBRARY_PATH: /usr/lib
PATH: /usr/bin:$PATH
CPPFLAGS: -I/usr/include

And here is the script I use to install gdk-pixbuf-2.0

cd /usr/local/src
  wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.24/gdk-pixbuf-2.24.0.tar.xz
  tar xvfJ gdk-pixbuf-2.24.0.tar.xz
  cd gdk-pixbuf-2.24.0
  ./configure --prefix=/usr
  make V=0
  make install
  ldconfig

After installing, the result of calling whereis gdk-pixbuf-2.0 is this:

`gdk-pixbuf-2: /usr/lib/gdk-pixbuf-2.0 /usr/include/gdk-pixbuf-2.0`

For comparison, the result of calling whereis libpng (which was installed via yum install libpng-devel, and which pkgconfig and the dependendent libraries have no trouble finding), is this:

`libpng: /usr/lib64/libpng12.so /usr/lib64/libpng.so /usr/share/man/man3/libpng.3.gz`

Solution

  • Okay, after considerable digging, I found the solution. The environment variables were being set in a separate .ebextensions config file, which had not been parsed yet at the time this command ran, so the PKG_CONFIG_PATH had not been set yet.