Extract (decompressed in home/sjm/) into ns-allinone-2.29/tcl8.4.11/unix/ns-allinone-2.29/tcl8.4.11/tk8.4.11/unix/ns-allinone-2.29/otcl-1.11/
1. Install NS2.
Download ns-allinone-2.29.tar.gz
Tar xzvf ns-allinone-2.29.tar.gz
(Decompress the package in home/sjm)
Enter
Ns-allinone-2.29/tcl8.4.11/unix/
Ns-allinone-2.29/tcl8.4.11/tk8.4.11/unix/
Ns-allinone-2.29/otcl-1.11/
Then cp configure {,. orig} & sed "s/relid '/relid/" configure. orig> configure
(Solve ns2-2.29 and Ubuntu-6.06 bash incompatibility issues)
Sudo apt-get install libxmu-devsudo apt-get install-f libxt-dev
Sudo gedit home/sjm/ns-allinone-2.9/nam-1.11/agent. h
73rd rows. Change NULL to 0.
Cd ../..
Sudo./install
Sudo gedit/etc/bash. bashrc
Add at the end
Export PATH = $ PATH:/home/sjm/ns-allinone-2.29/bin:/home/sjm/ns-allinone-2.29/tcl8.4.11/unix:/home/sjm/ns-allinone-2.29/tk8.4.11/unix
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/home/sjm/ns-allinone-2.29/otcl-1.11:/home/sjm/ns-allinone-2.29/lib
Export TCL_LIBRARY =/home/sjm/ns-allinone-2.29/tcl8.4.11/library
(Modify the environment variable above)
Close the terminal and re-open it.
Ns
%
Done!