Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm compiling NETCDF on Linux.

After configure, make,make install, I have already install NETCDF on
/disk3/lly/lib/netcdf-4.1.3.

Then, using vim ~/.bashrc,edit:

export DIR=/disk3/lly/lib    
export NETCDF=$DIR/netcdf-4.1.3/    
export PATH=$DIR/netcdf/bin:$PATH     

And source ~/.bashrc.
But When I use which $NETCDF and which $DIR, I got this:

>> [lly@localhost netcdf-4.1.3]$ which $NETCDF
>> /usr/bin/which: no  in (/disk3/lly/lib/netcdf-4.1.3)       
>> [lly@localhost netcdf-4.1.3]$ which $DIR
>> /usr/bin/which: /usr/bin/which: no lib in (/disk3/lly)
share|improve this question
    
what are you trying to do? which tells you where binaries are located based on your search PATH, but you are passing it directories... that isn't how it works. – casey Jan 18 '16 at 3:00
    
Sorry, I was wrong. – Han Zhengzu Jan 18 '16 at 3:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.