LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   program installation problems... (https://www.linuxquestions.org/questions/linux-newbie-8/program-installation-problems-218351/)

nate1 08-16-2004 12:43 PM

program installation problems...
 
I've been trying to install programs onto my Linux on and off for the last year. Invariably, I have problems despite the fact that I always make a concerted effort to follow the README instructions as closely as possible.... At the moment I'm trying to install a program that happens to be called "root" and here's a synopsis of my troubles:

the instructions for ins talling from the source are as follows:

1) tar zxvf root_v4.00.08a.source.tar.gz
2) export ROOTSYS=<path>/root
3) cd root
4) ./configure --help
5) ./configure <target>
6) gmake
7) gmake install
8) export PATH=ROOTSYS/bin:$PATH
9) export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
10)root

First of all, I'm not exactly sure what to put in for <target> in part 5). I found a book that seemed to suggest inserting "-prefix=/usr" but I got an "invalid option" error. If I leave out the <target> part and just type in "./configure" I get an error that looks like this:

Configuring for linux
Checking for libX11 ... no
configure: libX11 (package x11-devel) MUST be installed

This last error seems to be common with all of the programs that I have tried to install, but I'm pretty sure I do have libX11.... and here's the kicker - I actually did somehow get this program up and running once about a year ago, but when I went back to use it again it wouldn't work. When I typed "root" (the name of the program) I got an error saying command not found.... why would that happen?

Well I appreciate anybody who actually takes the time to read through this. I would be even more appreciative if somebody could come up with a solution to my problem. As if it isn't obvious enough, I have an extremely limited knowledge of Linux, so please be kind if my problems are trivial.... Thanks.

Nate

korozion 08-16-2004 01:01 PM

Note that libx11 and libx11-devel are different

masand 08-16-2004 01:22 PM

if un have libx11 devel also installed maybe u should find out whrere is the missing file first bu
#updatedb
wil take some time
then
#locate libX11..

then if it is in some directory where the compiler might not be looking then u can make a symbolic link by using
#ln-s

regards
gaurav

nate1 08-16-2004 02:33 PM

Thanks a lot...

I tried the "updatedb" and "locate libX11" commands from which I was able to get locations for libX11 which are as follows:

/usr/X11R6/lib/libX11.so.6.2
/usr/X11R6/lib/libX11.so.6

I'm not sure how to implement the last command that you suggested, though, which was "ln-s" as I got the error message:

bash: ln-s: command not found

I assume the # means I have to be superuser... Also, refering back to my original post, how do I insert this new address into 5)? I tried following the vague suggestions that scrolled passed after step 4), but nothing that I try seems to work. Thank you so much for your help.

Nate

masand 08-16-2004 02:46 PM

hi there
the command is
#ln -s /lib/shouldbehere /usr/lib/itisnowhere

this will make a sysmbolic link for /usr/lib/itisnowhere to

/lib/shouldbehere

this make ur compiler to automatically go from /lib/shouldbehere

to /usr/lib/itisnowhere

also i may happen that ur compiler is looking for some other version of X11 sincew i too had some problems where the compiler required some lib.so.2 and i had lib.so.6
so u need to check the versuion which is requirwed and the version u have


also if u are using RPMS then u may find ur verson by
#rpm -qa|grep libX11

regards
gaurav

nate1 08-16-2004 03:03 PM

Okay, I think I understand but how do I know where the file SHOULD be?

Also, the last command, "rpm -qa|grep libX11" didn't seem to do anything.

Again, thanks for your help and your patience,

Nate

jomen 08-16-2004 03:21 PM

the better and recommended way to do this is:

libraries are loded with the library-loader ld.so - this program has a configuration-file

/etc/ld.so.conf

there you put the paths ( /usr/X11R6/lib ) to all your libraries...

after putting anything new in this file - or after installing new libraries - you need to update the database which ld.so keeps by giving this command:

ldconfig

this runs a few seconds and then your libraries in /usr/X11R6/lib are found every time they are needed

no need to put symlinks anywhere - they would be a pain ... to keep in sync every time you decide to upgrade your libraries



my /etc/ld.so.conf looks like this:



# Begin /etc/ld.so.conf

/usr/local/lib

/usr/lib/mysql

/opt/mozilla-1.7/lib/mozilla

## Gnome 2.4 ###

# /opt/gnome-2.4/lib

## Gnome 2.6 ###

/opt/gnome-2.6/lib

## GNOME-1.4
/opt/gnome/lib

## X-libs

/usr/X11R6/lib

## TEX ###

/usr/local/teTex/lib

## Begin qt addition to /etc/ld.so.conf

/opt/qt/lib

## End qt addition

## Begin KDE-addition

/opt/kde/lib

## End KDE-addition

# End /etc/ld.so.conf

masand 08-16-2004 03:42 PM

i agree ldconfig is a better way of doing the same
but oin the aboe case i think thee is the dependency problem maybe
the library needs to upgraded or the version should be checked , many of these these libraries are also not backward compatible..

check out the version

and what is the distro u r trying ????

regards
gaurav

nate1 08-16-2004 03:44 PM

Jomen:

I'm not sure I understood you. It looks like you want me to add any new libraries that I get to the "/etc/ld.so.conf" file and then run the command "ldconfig." The problem is, at least to my knowledge, I haven't yet added any new libraries, although I'm beginning to suspect that I might need to... Also, when I try to run the command "ldconfig" I get the error message:

bash: ldconfig: command not found

And my /etc/ld.so.conf looks like this:

/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/sane
/usr/lib/qt-3.1/lib
/usr/lib/qt2/lib


Thanks for you post,

Nate

nate1 08-16-2004 03:48 PM

I'm using Red Hat Linux 9: Red Hat Linux x86

masand 08-16-2004 04:03 PM

hey how is ldconfig not running on ur system

i also have used ldconfig on my RH 9.0
i suspect u may have not installed the ldconfig package
and i do not know if u can have an option to leave the ldconfig package

also from ur 1st post it is
--prefix not -prefix

also the last two commands of export specify ur environment of that library

get the output of the following command

[root@gaurav root]# rpm -qa|grep x11-devel

my output was in fedora 2 (an upgrade of redhat 9.0)
is
xorg-x11-devel-6.7.0-2


regards
gaurav

nate1 08-16-2004 04:12 PM

There is no output when I type "rpm -qa|grep x11-devel"

should I be logged in as root user when I try ldconfig? I am superuser, and as far as I know that's the same....

Nate

jomen 08-16-2004 04:18 PM

no - not exactly...

what you put in this file are just paths to directories - as you can see

the libraries are in these directories - look into /usr/X11R6/lib and there you have all the libraries belonging to your X-Server

all the libraries under this directory are then found by the library loader

when you compile a program from source, the way is usually like this:

first you configure the source-files - often this is done with the help of a script called "configure" in the top-level of your source-file-tree - it is there in your case and you probably have run it.
you can give this script options with it to scecify, how the program (actually - the Makefiles which control the build-process) is to be compiled

to see what options there are available, you use the command:

./configure --help

since there are a lot more options than would fit on your screen, give this command:

./configure --help | less

with these options you can also control, what gets installed where - once the program is built
(these are the "targets" you where wondering about)
all these options (like --help itself) have defaults - which you will also see...


you build it with issuing:

make


and install it with issuing:

make install

(gmake is just another version of make...I think "make" will do)
What program is this you are trying to build anyway - just curious but it could also help too

during "make install" all the built files are copied to the locations specified in the Makefile - which get set up ( or altered...) when you run ./configure


since /usr/X11R6/lib is already in the file - this is not causing your problem

...ldconfig is a command which probably is only is roots PATH and also only executable by root

to run it you need to be root and - if it still is not found - give the full path to the program too - like this:

/sbin/ldconfig

What your error was about:

to compile a program it needs so called header-files - available as ...dev-packages for distibutions - that is what korozion was talking about.
you need to have the xfree_whatever.dev package installed to be able to compile programs which need XFree to run...

hope that helped...

nate1 08-16-2004 04:50 PM

To satisfy your curiosity, the program that I am trying to install is called Root and it is an "Object Oriented Data Analysis Framework," as the manual puts it... I will hopefully soon be able to use it in order to make fancy graphs and whatnot....

So are you teling me that I need to install this .dev package before I can proceed? If so, where do I get it?

Judging from my error message which read: "configure: libX11 (package x11-devel) MUST be installed" I imagine that I need something by that name....

Nate

jomen 08-16-2004 05:22 PM

As I said "...just curious but it could also help too"

not pure curiosity - some programs are configured in a weird way - even if they provide the scripts to configure them...

Yes I'm telling you, that you need to install the Xfree-dev package - for now - there may be other dependencies.
But if there are none mentioned in the Readme which probaly came with the source-archive you want to build, than you should be good to go.

I don't know what distribution you are running - but even if I would, I probably would not know where you'd have to look or for what name exactly.
Try the place where your X-Server packages came from - or even one of your install-CDs
Use the package-manager which hopefully is part or your distribution.
sorry - can't say more


All times are GMT -5. The time now is 04:40 PM.