I'm trying to install NS2 on Ubuntu 14.04. I followed the steps that are recommended and in this answer. But I'm still facing lots of errors.

/home/smallko/ns-allinone-2.28/sgb/gb_io.w:576: undefined reference to `_fclose'
collect2: error: ld returned 1 exit status
make: *** [test_io] Error 1
Unable to create sgb library, but it's optional, so continuing...
* Build GT-ITM
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
* Build zlib
./install: 382: ./install: ./configure: Permission denied
Zlib-1.1.4 configuration failed, but it's optional, so continuing ...
* Build tcl8.4.5
make: *** No rule to make target `/home/smallko/ns-allinone-2.28/tcl8.4.5/unix/dltest/Makefile.in', needed by `Makefile'.  Stop.
./install: 409: ./install: ./configure: Permission denied
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.

I tried a lot but I can't fix this Permission denied error. Or is there another problem?

  • »» ./configure: Permission denied «« : Happens when a Windows© tool is used for the unpack of ns-allinone-2.28.tar.gz .... or if unpacked with 'sudo' . No root or sudo for any ns2 commands, please. ( Except for 'sudo make install' ) . .... Why use ns-2.28 ? – Knud Larsen Jul 2 '16 at 9:58
  • I have a modified version of NS2 and I need to run that exact one. – Hanna Jul 2 '16 at 13:26
  • I unpacked it in Ubuntu and not Windows. – Hanna Jul 2 '16 at 13:27
  • »» I have a modified version of NS2 «« : Which protocol is it about ? .... May be you got a corrupt copy ? ... There is a solution, if you are sure you unpacked in a right way : chmod +x configure ... etc. etc. all scripts with 'Permission denied'. – Knud Larsen Jul 2 '16 at 13:53
  • This copy has been tested before. I used chmod 777 but it works for a file not all files in a folder. I have lots of files in different folders. – Hanna Jul 3 '16 at 6:52

Ubuntu 14.04 : libc6, libc6-dev was "updated", and can no longer be used to build old ns2. Ubuntu 12.04.5 can be used for the most versions. But not for certain patches / changes containing old code.

The usually recommended OS for ns2 is CentOS 6.8 - i386 http://ftp.funet.fi/pub/mirrors/centos.org/6.8/isos/i386/CentOS-6.8-i386-LiveCD.iso ... except for the ~4 patches requiring a 64bits OS.

ns-allinone-2.28, Ubuntu 12.04.5, CentOS , etc. :

tar xvf ns-allinone-2.28.tar.gz
cd ns-allinone-2.28/
patch -p0 < ns228-gcc41-64_2016-1.patch
export CC=gcc34 CXX=g++34
cd ns-2.28/
sudo make install
cp ns ns228-orig   (This is your backup of the original 'ns')
sudo cp ns228-orig /usr/local/bin/

And do not add any *PATH to .bashrc . Not required.

Links :

ns228 patch https://drive.google.com/file/d/0B7S255p3kFXNVWpLZFgxNl9SazA/view?usp=sharing

gcc34, Ubuntu 12*, 64bit https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing

g++34, Ubuntu 12*, 64bit https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing

NAM 64bit https://drive.google.com/file/d/0B7S255p3kFXNNmtLeXhsaG5hXzQ/view?usp=sharing ... All nam http://www.linuxquestions.org/questions/linux-newbie-8/ns-stop-couldn%27t-execute-nam-permission-denied-while-executing-exec-nam-4175524760/#2

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.