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.
Thursday, October 30, 2008
Sunday, October 26, 2008
Batch convert jpg to eps on Ubuntu
Tried to find the way to convert jpg to eps in a batch mode.
It is difficult to find it online.
Thus, I record my method here.
In command line:
1. install imagemagick (sudo apt-get install imagemagick)
2. for i in *.jpg; do convert $i $i.eps; done
If there are "i" in the pictures names, it may cause the problem, in order to avoid this problem, you may replace "i" with "z"
It will keep the file name unchanged.
It is difficult to find it online.
Thus, I record my method here.
In command line:
1. install imagemagick (sudo apt-get install imagemagick)
2. for i in *.jpg; do convert $i $i.eps; done
If there are "i" in the pictures names, it may cause the problem, in order to avoid this problem, you may replace "i" with "z"
It will keep the file name unchanged.
Subscribe to:
Posts (Atom)