1

I was changing the bashrc file based upon the following video https://www.youtube.com/watch?v=Ipd8vkAj8Fk&t=182s but suddenly when I type sudo su I get the following error

bash: export: `/home/mala/WRFinstall/Build_WRF/LIBRARIES/mpich/bin:/home/mala/WRFinstall/Build_WRF/LIBRARIES/netcdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games': not a valid identifier

I tried to edit the bashrc file by typing nano ~/.bashrc but I can't find the file I edited. I only get content of a normal bash file.

Mala Pokhrel
  • 97
  • 2
  • 15
  • 1
    Could you add the content of the video you followed, the commands you ran at least? – M. Becerra Jun 12 '17 at 09:39
  • 2
    Why did you edit your .bashrc? Please give more information. If it is _your_ .bashrc, why do you have to use sudo? Does the error also occur when you run `source ~/.bashrc`? Or did you by accident modify `root`'s .bashrc? Test this by running `sudo cat /root/.bashrc`. From the error message, it seems that should read `export PATH=...`, but you missed the identifier "PATH". – ridgy Jun 12 '17 at 09:44
  • It appears you edited this ` /etc/bash.bashrc ` file please check that – George Udosen Jun 12 '17 at 10:17
  • Thank you @ridgy .I accidentally modified the root bashrc .when i typed 'sudo cat /root/.bashrc' i found the content i modified .I had followded the previous video and this link http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php `#WRF environment variables export DIR=/home/mala/WRFinstall/Build_WRF/LIBRARIES export CC=gcc export CXX=g++ export FC=gfortran export CFLAGS=-m64 export F77=gfortran export FFLAGS=-m64 export PATH=$DIR/netcdf/bin:$PATH export NETCDF=$DIR/netcdf export PATH= $DIR/mpich/bin:$PATH` How can i change it? – Mala Pokhrel Jun 12 '17 at 11:14
  • As you are using `nano`, just run `sudo nano /root/.bashrc` and remove the accidentially added lines. The error is the blank after `PATH=`; there must be no whitespace there (see the other `export`statements). – ridgy Jun 12 '17 at 11:18
  • Thanak you @ridgy . It solved my problem – Mala Pokhrel Jun 12 '17 at 11:21
  • 1
    @ridgy post that as a proper answer instead of comment – Sergiy Kolodyazhnyy Jun 12 '17 at 12:48
  • @MalaPokhrel Please add the text file content into your post. It's impossible to read in a comment. – wjandrea Jun 12 '17 at 19:01

0 Answers0