Ask Linux Guru: How to install custom software library not in /usr/lib

sommer

新手上路
注册
2004-01-18
消息
86
荣誉分数
0
声望点数
0
I have downloaded the latest ABC-1.5 standard gnu tarball and like to install it at /opt/prefix/bin and /opt/prefix/lib

Do I have to uninstall the old ABC-1.4.rpm rpm package before install and use the new library ?

It the answer is NO, then
How could I maintain the /opt/prefix directory after I install more and more packages there without conflicting with old version /usr/bin and /usr/lib?

Thx a lot for your input!
 
two mays:

1. use source code and build it by yourself. you should configure to your directory you want to install before building.
2. use GNU tarball binary and untar the files to your place you want to install.

About rpm, you can use "rpm -U ABC-1.5.rpm" to update your existing package.
Software package manager RPM should take care everything during upgrading.
 
最初由 Emperor 发布
two mays:

1. use source code and build it by yourself. you should configure to your directory you want to install before building.
2. use GNU tarball binary and untar the files to your place you want to install.

About rpm, you can use "rpm -U ABC-1.5.rpm" to update your existing package.
Software package manager RPM should take care everything during upgrading.

In theory, RPM seems to be better approach, but actually it is a hell if the package you want to upgrade is intertwinded with a lot of other packages.

In my case, I just want to install Airsnort on my Redhat8.0, Airsnort needs gtk+2.0, so I downloaded gtk+2.0, but the nightmare start from here!!! Because the dependencies, you finally find that in order to install gtk+2.0, you got to totatally upgrade your system to RH9.0, because almost all the packages need to be upgraded.

So I downloaded the tarball and do configure --prefix=/opt/gtk,
but the configure failed asking for other packages as well including something that are already on your system.

It seems that the best way is to download the binary tarball and put it under /usr/local/bin and/usr/lib/bin,
then then cross your fingers to see if the binary will format your harddisk or give you an exciting moment!
 
I have got similar problems as yours. The installation script doesn't seem to be able to detect the existing libraries.

I am suspecting that maybe you need to change the PATH variable which is stored in the /etc/profile or your $HOME/.bashrc file. But I haven't found out exactly what to do though. Please post your solution once you figure out what to do.

最初由 sommer 发布


In theory, RPM seems to be better approach, but actually it is a hell if the package you want to upgrade is intertwinded with a lot of other packages.

In my case, I just want to install Airsnort on my Redhat8.0, Airsnort needs gtk+2.0, so I downloaded gtk+2.0, but the nightmare start from here!!! Because the dependencies, you finally find that in order to install gtk+2.0, you got to totatally upgrade your system to RH9.0, because almost all the packages need to be upgraded.

So I downloaded the tarball and do configure --prefix=/opt/gtk,
but the configure failed asking for other packages as well including something that are already on your system.

It seems that the best way is to download the binary tarball and put it under /usr/local/bin and/usr/lib/bin,
then then cross your fingers to see if the binary will format your harddisk or give you an exciting moment!
 
rpm doesn't seem to work with me. I much prefer to build from source.

最初由 Emperor 发布
two mays:

1. use source code and build it by yourself. you should configure to your directory you want to install before building.
2. use GNU tarball binary and untar the files to your place you want to install.

About rpm, you can use "rpm -U ABC-1.5.rpm" to update your existing package.
Software package manager RPM should take care everything during upgrading.
 
what I usually do

1. I use rpm as much as possible. Mandrake s/w management is based on RH but better . It is called "urpm", as long as you set up a rpm repository, urpm will resolve dependencies automaticaly for you. It is just a Perl script, so it can be easily migrated to RH.

2. To build from source code, there is a couple of things you should do:

2.1 check README, and INSTALL file in the tar ball. They should tell you all about dependencies for this software.

2.2 install all your own libraries to resolve the dependencies. I usually install them under /usr/local/lib.

2.3 run ./configure --help, this usually give you how to connect dependencies, sometimes you have to point out the souce code path of libraries, or sometimes just point to /usr/local/lib. Do the configure first, and then build the software using make. Then do "make install" and testing.

2.4 If 2.3 doesn't work, try to change configure command, point to different path. and re-build and test untile it works.

2.5 Because your software and dependencies are self-contained (under /usr/local), you can consider convert /usr/local to a seperate FS, this way, next time you upgrade your kernel (usually upgrade to a higher version of Mandrake or RH), you don't need to do the same thing again.

Hope this will help.
 
I think RPM have options like "--nodeps" to allow you bypass the dependency check.
 
I have spent totally 4 days and nights searching, reading, experimenting, failing and finally succesfually installing gtk+2.0 on my RH80 Box.

To be honest, I am almost exhausted and about to give up. And finally I made it by chance and luck.

Following is my summary written up in a rough manner hoping to relief some of the pains you guys will be facing.

Summary:

1. Intro:
1.1 want to install airsnort
1.2 search rpmfind.net to no avail(only rpm from other distros, not for Redhat, if anyone have experience with mixed-distro rpm installation, plz do not hesitate to let me know)
1.3 download sourcce tarball from airnort website.
1.4 uncompress and ./configure --prefix=/usr/local(Or /opt/gnu, etc.)
1.5 error messgage from ./configure script shows dependencies on gtk+2.0
1.6 search gtk+2.0 from rpmfind.net and find PLD distro of the gtk+-2.3.1-1.i686.rpm
gtk+-2.3.1-1.src.rpm
Although not Pure Redhat distro, but seems not to conflict with RH, worth trying at the first thought.

2. Possible Solutions:
2.1 compile the source
2.2 install SRPMS
2.3 install RPMS

3. Conclusion:
best way to go is http://www.freshrpms.net
any install the apt-get and synoptic tools for Redhat(ported from debian)
 
后退
顶部