Fedora This forum is for the discussion of the Fedora Project. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-22-2007, 07:35 PM
|
#1
|
LQ Newbie
Registered: Jul 2007
Posts: 9
Rep:
|
Unale to permanently set LD_LIBRARY_PATH
Below are the commands I use to set the library path for Matlab libraries. Every time I boot up the system I have to enter these commands. How do I export them permanently? I am running Fedora 7.
[cheeta05r@localhost ~]# export LD_LIBRARY_PATH=/usr/local/matlab74_sv/sys/os/glnx86:$LD_LIBRARY_PATH
[cheeta05r@localhost ~]# export LD_LIBRARY_PATH=/usr/local/matlab74_sv/bin/glnx86:$LD_LIBRARY_PATH
Thanks in advance.
Last edited by cheeta05r; 08-25-2007 at 09:46 AM.
|
|
|
08-22-2007, 07:55 PM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Add those commands to your ~/.bash_profile. After that logout and back in again.
|
|
|
08-22-2007, 08:10 PM
|
#3
|
LQ Newbie
Registered: Jul 2007
Posts: 9
Original Poster
Rep:
|
That didn't work. I entered those two lines in my Bash_profile as seen below.
/usr/share/doc/bash-3.2/startup-files/Bash_profile
Code:
# Startup file for bash login shells.
#
default_dir=/usr/local/lib/
if [ -n "$PS1" ]; then
PS1='\u@\h(\#)\$ '
IGNOREEOF=3
fi
LOGIN_SHELL=true
# If the user has her own init file, then use that one, else use the
# canonical one.
if [ -f ~/.bashrc ]; then
. ~/.bashrc
elif [ -f ${default_dir}Bashrc ]; then
. ${default_dir}Bashrc;
fi
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/sys/os/glnx86:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/bin/glnx86:$LD_LIBRARY_PATH
|
|
|
08-22-2007, 08:50 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
The file you are supposed to put the commands is a hidden file located in your home directory (~ is a shortcut for your home directory). If you want the variable to be global, you can put the commands in /etc/profile or create a file (e.g. matlab.sh) in /etc/profile.d, enter the commands in there and make the file executable.
|
|
|
08-22-2007, 10:12 PM
|
#5
|
LQ Newbie
Registered: Jul 2007
Posts: 9
Original Poster
Rep:
|
So I added the lines to the hidden file located in my home directory as seen below. This didn't work. To test it I've logged out and logged back in, then try running the executable file requiring the libraries.
This really seems like something that shouldn't be this hard. Thanks in advance for helping me out with this.
[cheeta05r@localhost ~]# ls -a
.bash_profile
Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/bin/glnx86:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/sys/os/glnx86:$LD_LIBRARY_PATH
|
|
|
08-23-2007, 03:30 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
If you have added the lines to ~/.bash_profile, then logged out and back in again, what is the output of doing
Code:
$echo $LD_LIBRARY_PATH
|
|
|
08-23-2007, 08:07 PM
|
#7
|
LQ Newbie
Registered: Jul 2007
Posts: 9
Original Poster
Rep:
|
Neither of the below commands produced any result.
Code:
[cheeta05r@localhost ~]# $echo $LD_LIBRARY_PATH
[cheeta05r@localhost ~]# echo $LD_LIBRARY_PATH
[cheeta05r@localhost ~]#
|
|
|
08-30-2007, 08:16 PM
|
#8
|
LQ Newbie
Registered: Jul 2007
Posts: 9
Original Poster
Rep:
|
BTW by putting the below lines in .bashrc I was able to get it to work.
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/sys/os/glnx86:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/matlab74_sv/bin/glnx86:$LD_LIBRARY_PATH
|
|
|
All times are GMT -5. The time now is 03:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|