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.
source ~/.bashrc
? Or did you by accident modifyroot
's .bashrc? Test this by runningsudo cat /root/.bashrc
. From the error message, it seems that should readexport PATH=...
, but you missed the identifier "PATH". – ridgy Jun 12 '17 at 09:44/etc/bash.bashrc
file please check that – George Udosen Jun 12 '17 at 10:17#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:14nano
, just runsudo nano /root/.bashrc
and remove the accidentially added lines. The error is the blank afterPATH=
; there must be no whitespace there (see the otherexport
statements). – ridgy Jun 12 '17 at 11:18