LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-01-2012, 12:40 AM   #1
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Rep: Reputation: Disabled
problem in source the bashrc


hi
Iv tride to install intel composer on the centOS linux.
after installing, I gave the path to the bin and lib directory.
then Iv tride source the bashrc ($source ~/.bashrc), but not only it did'nt run but also my linux cant undrestand some command like ls, nano, vim and some othe any more. it give "-bash: ls: command not found" when I order for example ls command.what should I do?
tanks in advance

Last edited by saeedian; 01-01-2012 at 01:02 AM.
 
Old 01-01-2012, 01:18 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
The usual way to setup the Intel compiler is to source it's setup script:

Code:
source <install-dir>/bin/compilervars.sh argument
Where argument is ia32 or intel64. Is that what you have in your bashrc?

Have you read these?

http://software.intel.com/en-us/arti...x-with-ubuntu/

http://software.intel.com/file/32647
 
Old 01-01-2012, 09:40 AM   #3
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
thanks for those links
now how can I repair my linux?
thanks
 
Old 01-01-2012, 03:01 PM   #4
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
it sounds like you replaced the PATH variable
rather than just appending the new path to it

for instance
export PATH=/some/new/path:$PATH

will preserve the old PATH settings

to get back to where you need to be
try just running
/etc/profile

or simply do
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/bin"

once you get things working again you might want to fix
~.bashrc and do a soft reboot to get all your variables back the way they should be
 
Old 01-02-2012, 12:21 AM   #5
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
may be you can paste the contents of your bashrc to help us confirm the issue.
 
Old 01-02-2012, 01:44 AM   #6
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
now I have to use the $/bin/ls and $/bin/vi to get list, and open the files


my bashrc file is:
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# added by WIEN2k: BEGIN
# --------------------------------------------------------
alias lsi="ls -aslp *.in*"
alias lso="ls -aslp *.ou*"
alias lsd="ls -aslp *.def"
alias lsc="ls -aslp *.cl*"
alias lss="ls -aslp *.sc*"
alias lse="ls -aslp *.error"
alias pslapw="ps -ef |grep "lapw""
alias cdw="cd /home/user41/WIEN2k"
export OMP_NUM_THREADS=1
#export LD_LIBRARY_PATH=.....
export EDITOR="emacs"
export SCRATCH=./
export WIENROOT=/home/user41/WIEN2K
export W2WEB_CASE_BASEDIR=/home/user41/WIEN2k
export STRUCTEDIT_PATH=$WIENROOT/SRC_structeditor/bin
export PDFREADER=acroread
export PATH=$PATH:$WIENROOT:$STRUCTEDIT_PATH:.
export OCTAVE_EXEC_PATH=${PATH}::
export OCTAVE_PATH=${STRUCTEDIT_PATH}::

export QMC_ARCH="linuxpc-ifort-parallel"
export PATH=$PATH:/home/user41/CASINO/tools/CASINO/bin_qmc
export PATH=$PATH:/home/user41/CASINO/tools/CASINO/bin_qmc/linuxpc-ifort-parallel/opt/





export PATH=$PATH:$WIENROOT:.
ulimit -s unlimited
alias octave="octave -p $OCTAVE_PATH"
# --------------------------------------------------------
# added by WIEN2k: END

export PATH=$:/home/user41/intel/composer_xe_2011_sp1.8.273/bin
export PATH=$:/home/user41/intel/composer_xe_2011_sp1.8.273/compiler/lib


problem occurred when I tride source the last tow lines
 
Old 01-03-2012, 03:23 AM   #7
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
change them to

Quote:

export PATH=$PATH:/home/user41/intel/composer_xe_2011_sp1.8.273/bin
export PATH=$PATH:/home/user41/intel/composer_xe_2011_sp1.8.273/compiler/lib
 
Old 01-03-2012, 11:15 PM   #8
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
in this time my linux is impaired because of wrong sourcing the bashrc when I
wanted give the path to intel composer. my linux cant undrestand commands like "ls" "cp" "nanno"
"vi" and some other. when I use one of those command say "-bash ls: command not found"
how can I repair it?
tanks
 
Old 01-04-2012, 12:03 AM   #9
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Hi Saeedian,

The thinking in this thread is that your $PATH variable got messed up somehow.

Check it's contents:

Code:
echo $PATH
Fix it:

Code:
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
If you are able to run commands again, take the opportunity to fix the problem in your ~/.bashrc.
 
Old 01-04-2012, 12:36 AM   #10
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
its work tank you very much jhwilliams.
and would you help me to source the bashrc?
tanks
 
Old 01-04-2012, 12:45 AM   #11
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
First, you'll want to fix your Bash files, as they seem to have gotten messed up.

One way to do this:

Code:
find /etc/skel/ -exec cp {} $HOME/ \;
Now logout and log back in.

Next, add the following line to the end of your ~/.bashrc:

Code:
source $HOME/intel/composer_xe_2011_sp1.8.273/bin/compilervars.sh ia32
That assumes you're running a 32-bit system. Otherwise, use the 64 bit target instead of ia32.
 
Old 01-04-2012, 03:40 AM   #12
saeedian
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
its work
my problems solved. tanks you jhwilliams.
you are very expert man.
 
  


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
gnome: Fedora/CentOS source .bash_profile but Ubuntu/Debian source .bashrc centguy Linux - Software 6 01-17-2010 08:35 PM
Can I override system wide source by editing bashrc m2azer Linux - Newbie 1 10-29-2009 06:24 PM
bash's source command doesn't work with .bashrc crs_zxf Linux - Newbie 18 03-07-2009 02:25 AM
Why do I have type this source /etc/bashrc to get [root@fedora6-01 ~]# ? micko_escalade Linux - Newbie 5 07-13-2007 06:03 AM
ssh remote login - how to source .bashrc automatically newsgroupie2003 Linux - General 2 08-16-2005 04:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 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