Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to use a program on a computer where I do not have root permissions. The program is installed from source (program.tar.gz) with the usual three commands
./configure
make
make install
I know that I can choose an install path with e.g.
./configure --prefix=/home/myhome/programs
But I don't know how to set up the paths in a way that the program can find all of its files.
Are there tools to simplify the install of programs without root rights? What is the best way to install programs in home directories?
Best way?
As you did with --prefix. I usually do it in /tmp
Sometimes , I also pass the option for etc but I think its not needed in most cases. something like --configuration=/tmp/etc
My problem is that I don't know how to set up the environment. For the program I need a library that I installed successful under my home directory but when I want to ./configure the actual program it does not find this library.
I think I have to somehow setup paths to the various directories that are created in my /home/myhome/myprograms directory. How can I do this and which paths do I have to set up?
where is the executable file you want to run? find it and copy its absolute path (the one starting with a /) then add it to your $PATH variable. how?
PATH=$PATH:/path/to/your/executable
better store it in your .bashrc file usually found in your home directory.
The thing is it depends a lot on how good the configure script is done.
Some will get it from --libdir or something like that.
You might try ./configure --help (if its avail, always the case) and look at the options.
Otherwise, I usually look directly in configure.in or configure or Makefile to reverse-engineer what options I have to pass to ./configure
Other options (for not perfect configure.in) is to to it like this:
CPPFLAGS=... LDDFLAGS=... PKG_CONFIG_PATH=... ./configure
Last option for really stupid configure.in (I've never seen this) is to hardcore edit the Makefile, but that's not maintainable.
Don't forget to do make mrproper before rerunning ./configure
And then to run it, you can modify your path and set LD_LIBRARIES_PATH
where is the executable file you want to run? find it and copy its absolute path (the one starting with a /) then add it to your $PATH variable. how?
PATH=$PATH:/path/to/your/executable
Its not what the OP is asking!
Quote:
better store it in your .bashrc file usually found in your home directory.
No, in .bashrc you should not change your PATH, eventhough 50% of users do it.. its in the environment files, like .bash_profile.
I have a lot of examples where when running several subshells where .bashrc contains PATH=$PATH:/path/to/your/executable, you end up with
PATH=/path/to/your/executable:/path/to/your/executable:/path/to/your/executable:/path/to/your/executable:/bin/:/sbin/...
I still can't get it to run. What I really would like to have is a subdirectory under my home directory like /usr/local where I can install programs and libraries in a way that the system automatically finds everything without the need to pass many extra parameters to ./configure.
Now I added the following first to ~/.bashrc and than to ~/.bash_profile (.bash_profile did not exist) but it did not help (I used a new xterm window):
I still get this error from
./configure --prefix=/home/myhome/MyPrograms
checking for pangoft2 gtkglext-1.0... Package gtkglext-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found
configure: error: GtkGLExt is required.
this library is actually stored in
/home/myhome/MyPrograms/lib
I still get this error from
./configure --prefix=/home/myhome/MyPrograms
checking for pangoft2 gtkglext-1.0... Package gtkglext-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found
configure: error: GtkGLExt is required.
this library is actually stored in
/home/myhome/MyPrograms/lib
It tells you what to do:
Let's go step by step with the cleanest method.
When you installed this libgtkglext-1.0, you have dl the source, have put it in /home/myhome/MyPrograms/src/gtkglext-1.0
Then you did
./configure --prefix=/home/myhome/MyPrograms
make
make install
now you have /home/myhome/MyPrograms/lib which contains some .so and some .a.
You should also have a directory pkgconfig, and in this directory you have a file `gtkglext-1.0.pc' which should contain the string "prefix=/home/myhome/MyPrograms/"
Did you do it like this?
(or did you get a binary libgtkglext-1.0 that you put in /home/myhome/MyPrograms)
(then we'll go onto the next episodes.. suspense!)
I deleted everything and started from scratch like you proposed.
I installed the library from source, too and there is now
prefix=/home/myhome/MyPrograms
inside of
/home/myhome/MyPrograms/lib/pkgconfig/gtkglext-1.0.pc
Last edited by cumbersome; 06-23-2006 at 08:06 AM.
still get this error from
./configure --prefix=/home/myhome/MyPrograms
checking for pangoft2 gtkglext-1.0... Package gtkglext-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found
configure: error: GtkGLExt is required.
you do it again :
cd src
cd myprog
PKG_CONFIG_PATH=/home/myhome/MyPrograms/lib/pkgconfig ./configure --prefix=/home/myhome/MyPrograms
What happens?
I hope you get the idea behind, pkgconfig gives the place where the libs are and how a program has to be linked with this lib. Its a very neat tool.
PKG_CONFIG_PATH is an environment variable and not a command, isn't it? Do I have to use
the form
var=value command
means that you modify the environment so that command sees the variable "var" equal to value.
Quote:
set PKG_CONFIG_PATH=/home/myhome/MyPrograms/lib/pkgconfig
and then
./configure --prefix=/home/myhome/MyPrograms
This way I still get the error. I think somehow I have to enable this cool pkgconfig environment first before it can find its file.
With this set its not ok because when you run ./configure, the variable PKG_CONFIG_PATH is not seen.
So either you do my method or if you prefer to keep PKG_CONFIG_PATH for other makes you can do
Code:
export PKG_CONFIG_PATH=...
then
./configure
this time configure will see your variable
Then in the configure file, your variable wil be used like this:
INTERNAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig
and then configure will look for .pc files in this PATH
If you have /usr/lib/pkgconfig directory, then you already have pkgconfig feature.
thank you for your persistent help. Now I found out what kind of problem I had. All these commands and entries in the .bashrc etc did not work because I was not using the bash shell but something different. Now I changed the shell to bash and everything works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.