Installing Netgen from source on Ubuntu 10.4 (or Debian 6.0 Squeeze)¶
In this example we do everything inside the directory ~/src
(~
is a common shell convention to refer to your home directory, it is typically expanded to something like /home/yourusername
). You can create the directory with:
cd ~ mkdir src # create the directory, in case it does not exist, yet
Requirements¶
You will need to install a number of packages in order to compile Netgen correctly. You can do it with just one line from your shell:
sudo aptitude install tcl-dev tk-dev tix-dev libxmu-dev
Notice that you will need administrator priviledges in order to do that.
You may need to also install libglut-dev
and g++
(at least on a clean Debian 6.0 Squeeze installation).
Installing Togl from sources¶
There is a further requirement which is not available in the Ubuntu repositories. You'll then have to install it by hand. First let's download the package:
cd ~/src wget http://sourceforge.net/projects/togl/files/Togl/1.7/Togl-1.7.tar.gz/download tar xzvf Togl-1.7.tar.gz
Now enter the directory, configure, compile and install.
cd ~/src/Togl-1.7 ./configure make sudo make install
The last command will require to enter your password (and require you to be an administrator). If everything went as it should, typing the command ls /usr/lib/Togl-1.7
should produce the following output:
libTogl1.7.so pkgIndex.tcl
Installing Netgen from sources¶
Download the latest Netgen tarball and unpack it under the ~/src
directory.
cd ~/src wget http://kent.dl.sourceforge.net/project/netgen-mesher/netgen-mesher/4.9.13/netgen-4.9.13.zip unzip netgen-4.9.13 cd netgen-4.9.13
Configure, compile and install it:
./configure make sudo make install
That will create a directory under /opt
. Now get back to the ~/src
directory and download a file like this:
cd ~/src wget http://dl.dropbox.com/u/1820549/soton/netgen
The file should have the following content:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/Togl1.7 export NETGENDIR=/opt/netgen/bin /opt/netgen/bin/netgen "$@"
Copy the file in the /usr/bin
directory and adjust the permissions with the following two commands:
sudo cp netgen /usr/bin sudo chmod a+x /usr/bin/netgen
You should now be able to launch Netgen from the command line:
you@machine:~$ netgen & [1] 15400 you@machine:~$ NETGEN-4.9.13 Developed at RWTH Aachen University, Germany and Johannes Kepler University Linz, Austria Parsing ng.tcl optfile ./ng.opt does not exist - using default values