LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2013, 05:16 AM   #1
sudheer.svss
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Unhappy setting the path variables


hi friends,
I am trying to install Tophat software in my linux fedora 17. I was facing insatallation problems and I found the solution is to set the export LD_LIBRARY_PATH=/folder/to/boost/dist/lib
I have downloaded the boost in a directory called data, its path is /root/data/boost_1_40_0

i have installed boost 1.40 in /usr/local/include/boost as mentioned in the Tophat getting started website.
so i shud set the path to the above LD_LIBRARY_PATH.
i have tried to set as /usr/local/include/boost/dist/lib., but couldnot install Tophat software sucessfully., I request u to please give me suggestions on what is /to/ means.,

Last edited by sudheer.svss; 02-19-2013 at 05:20 AM.
 
Old 02-19-2013, 07:25 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Which is your shell - bash or csh/tcsh or any other?

For bash shell, add library in path as:
Code:
~$ set PATH=$PATH:/usr/local/include/boost/dist/lib
~$ echo $PATH
For csh/tcsh:
Code:
~$ setenv PATH $PATH:/usr/local/include/boost/dist/lib
~$ echo $PATH
To make it permanant, add the same line at the end of your .bashrc or .profile file.

Also share the error message that you're getting?
 
Old 02-19-2013, 07:48 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
There are a couple of PATH variables you may want to set.

The LD_LIBRARY_PATH should be set like this:
Code:
LD_LIBRARY_PATH=/folder/to/boost/dist/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
What that does is place the path to ".../dist/lib" before your existing LD_LIBRARY_PATH (if any). If you were to add an additional LD_LIBRARY_PATH variable to this, you would do it like this:
Code:
LD_LIBRARY_PATH=/folder/to/boost/dist/lib:${LD_LIBRARY_PATH}
LD_LIBRARY_PATH=new_path:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
That adds the new path to the previous path. The colon ( is important.

Bear in mind that LD_LIBRARY_PATH is "where to look for libraries;" e.g., files named something like libabc.a or libabc.so. It is highly unlikely that an include directory will have library files in it (include files are usually file.h and are used by the compiler) -- best check that.

Execution path, the PATH environment variable, is set similarly:
Code:
PATH=path-to-something-new:${PATH}
export PATH
You can set these in an individual user's .profile file or you can set them system-wide. If you set them in a user's .profile they'll be available to that user (say, a user that will be using the software you've added). If you set them system-wide, that can be done in /etc/profile (so every user will have the paths) or, better, if you have a directory /etc/profile.d, you can add a small executable shell program ("script") there. For example, this file sets up the path environment for a application named GMT on my systems:
Code:
cat /etc/profile.d/gmt.sh
#!/bin/sh
#ident	"$Id$"
#
#	Name:		$Source$
#	Version:	$Revision$
#	Modified:	$Date$
#	Purpose:	set local environment variables for GTM and netCDF
#	Author:		T. N. Ronayne
#	Date:		1 Oct 2009
#	$Log$
export GMTHOME="/opt/GMT"
export NETCDFHOME="/opt/netCDF"
export MANPATH="${MANPATH}:${GMTHOME}/man"
export MANPATH="${MANPATH}:${NETCDFHOME}/man"
# Set the local system $PATH:
PATH="${PATH}:${GMTHOME}/bin"
PATH="${PATH}:${NETCDFHOME}/bin"
The file, /etc/profile.d/gmt.sh is executable; i.e., it was created with a text editor then
Code:
chmod 755 /etc/profile.d/gmt.sh
NOTE: if you do not have an existing /etc/profile.d directory, do not do the above, simply add the lines in user .profile files or append them to the end of /etc/profile or refer to your documentation for how to do this in Fedora; the method is the same but where to put it may not be.

Hope this helps some.
 
Old 02-19-2013, 08:10 AM   #4
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Just curious, not a regular fedora user... but there's no Boost in it's repositories? That should make it a lot easier to get this up and working than trying to install Boost from source.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PATH variables gone after reboot msound Linux - General 5 02-09-2009 08:26 PM
adding variables to the PATH myrto Linux - Newbie 8 01-23-2007 08:34 PM
Extra path variables? mjm461 Linux - General 1 09-15-2005 02:21 PM
Setting PATH and other variables durrantj Ubuntu 2 08-25-2005 07:44 PM
adding $PATH variables karupt Linux - Newbie 5 03-07-2004 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration