3

I am trying to install a more recent version of a program than what is available via Synaptic, but I am running into a few problems. And I have one question beyond those problems. This is what I've done so far.

I downloaded the .tar.gz2, created a folder in /usr/local/ for the program. Call it app. So I now have a folder /usr/local/app. Inside the folder I extracted the archive. I then navigated a terminal to that folder and ran

sudo apt-get build-dep app

It downloaded and installed several libraries and I thought I was set. However, when I ran sh ./configure I encountered the following problem:

checking for GLIB - version >= 2.14.0... 
'pkg-config --modversion glib-2.0' returned 2.14.0, but GLIB (2.28.6)
was found! If pkg-config was correct, then it is best
to remove the old version of GLib. You may also be able to fix the error
by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
/etc/ld.so.conf. Make sure you have run ldconfig if that is
required on your system.
If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
to point to the correct configuration files

Ok, no problem. I went out and found Glib 2.14.0. I created a new folder /usr/local/glib. I extracted the archive to that folder. I ran the sh ./configure for Glib, and it went off without a hitch. I then ran make install for Glib. Again, no problems. It installed successfully. So now I was ready to rock! Back I went into /usr/local/app, and once again I ran sh ./configure. And I got the exact same error message. I am not understanding the message as it appears to say that ./configure requires GLib version 2.14.0 or later, and it found version 2.28.6, which would more than meet the requirement. I'm not great with shell scripts so I am somewhat, well, entirely, confused as to what it is this thing wants from me.

I am running Ubuntu 11.04 on a Toshiba Satellite. As you can see I'm not exactly a terminal warrior, but I can usually scratch my way through most problems and have learned quite a bit as I go. This one just has me stumped.

1 Answer 1

1

You have to set your LIBRARY PATH to the directory glib was installed to. Since it is user-built it will reside in another directory, I am not 100% sure, but my first guess is /urs/local/lib.

put this into your bash:

export LD_LIBRARY_PATH=/usr/local/lib
export LIBRARY_PATH=/usr/local/lib
export CPATH=/usr/local/include

and try again, i think make install will tell you the directory. so if its another one check its output.

if you want to check how your environment variables are set type

echo ${LD_LIBRARY_PATH}

of course you can replace the name with all other variables.

you have to set those environment variables every time you fire up a new shell, but you can write it to your bash_profile, too, i think (never tried that though).

10
  • I ran the exports and the echo produced: /usr/local/src/glib Which is exactly where GLIB was installed so everything should have been good to go. I then ran the ./configure again and still got the exact same message regarding GLIB. So the system knows where it is, yet it somehow isn't finding it when I run the shell script. I'm so confounded by this thing. Also, I can't run make or make install. In both cases I get the message that the make file is not found. There is a make file in the tar, obviously. My guess is that it won't run make until I get a successful configure.
    – Blind Fish
    Dec 25, 2011 at 16:54
  • Further clarification. Attempting to run make yields the message "make: *** No targets specified and no makefile found. Stop." Attempting to run make install gets results in "make: *** No rule to make target `install'. Stop." Perhaps I am using make wrong. This was a question for further down the road, I guess. I am installing a newer version of an existing program. Do I need specify that somehow when I run make or make / install? What target do I need to give?
    – Blind Fish
    Dec 25, 2011 at 17:01
  • ok, i am not pretty sure what to do from here now. have you tried ldconfig maybe you need to do a make clean before. other idea i have is that you might be missing the glib-dev package. you might be able to install this via apt.
    – Baarn
    Dec 25, 2011 at 18:06
  • you should try installing glib-dev first.
    – Baarn
    Dec 25, 2011 at 18:07
  • Sounds obvious, but have you run 'sudo ldconfig -v'?
    – user8290
    Dec 26, 2011 at 0:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .