Thursday, October 30, 2008

Set $PATH on Ubuntu

Sometimes the program needs to find the right location to execute.
For example, AMPL is hooked with IPOPT, AMPL needs to know where to find IPOPT. To set PATH variable on Ubuntu (or any other Linux) system is easy for them to work together.

Three steps:
1, open a terminal
2, sudo gedit .bashrc
3, add

PATH=${PATH}:your_directory/bin;
export PATH
4, source .bashrc
5, echo $PATH
That should make AMPL to find IPOPT executable.

¨export CC=gcc¨, when you encountered a configuraion or make problem, you may need to add this command before you configure or make your program.

No comments: