4

I want to work with Zettair search engine (see link). I installed it on Ubuntu 14.04, but I cannot install the Zettair executable in my PATH with following command. What should I do?

PATH=/usr/local/zettair/bin/zet:$PATH
export PATH=$PATH:/usr/local/zettair/bin/zet

The following codes work for the folder I run them. Therefore, by changing the folder I got the error again.

PATH=$PATH:/usr/local/zettair/bin/zet
export PATH
wjandrea
  • 14,109
  • 4
  • 48
  • 98
user3487667
  • 171
  • 1
  • 2
  • 6
  • Please post the output of `ls /usr/local/zettair/bin/zet` – 0x2b3bfa0 May 23 '15 at 14:20
  • Remove the last `zet` in `/usr/local/zettair/bin/zet`. `zet` is the name of the binary, you need to add the directory *containing* the binary. – muru May 23 '15 at 14:22
  • possible duplicate of [How to add a directory to my path?](http://askubuntu.com/questions/60218/how-to-add-a-directory-to-my-path) – karel May 23 '15 at 14:27

1 Answers1

9

It seems you have included the file name in the path, which is wrong. The PATH must contain the directory that in turn contains the executable you want to run, not the executable itself.

Use this:

export PATH="$PATH":/usr/local/zettair/bin

This will work for the running session and all child processes only, you can make it permanent by adding it to your ~/.bashrc file:

echo 'export PATH="$PATH":/usr/local/zettair/bin' >> ~/.bashrc
heemayl
  • 90,425
  • 20
  • 200
  • 267
  • 6
    If you want the PATH variable to be available at login and to other shells as well, export it to `echo 'export PATH=$PATH:/usr/local/zettair/bin' >> ~/.profile` – thethakuri Jul 06 '16 at 04:13