can't get ns2.34 on ubuntu 8.04 to work
i am using ubuntu 8.04. i have installed ns-2.34. i extracted it in the directory /home/bambos. i then wrote the following lines of code at the end of the bash file.
# LD_LIBRARY_PATH OTCL_LIB=/home/bambos/ns-allinone-2.34/otcl-1.13 NS2_LIB=/home/bambos/ns-allinone-2.34/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # TCL_LIBRARY TCL_LIB=/home/bambos/ns-allinone-2.34/tcl8.4.18/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/home/bambos/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix NS=/home/bambos/ns-allinone-2.34/ns-2.34/ NAM=/home/bambos/ns-allinone-2.34/nam-1.14/ PATH=$PATH:$XGRAPH:$NS:$NAM after this i run the command source ~/.bashrc in the terminal and then restarted my computer. after that i tried to run a program that i wrote by giving the command ns example.tcl in the terminal which gave the following error message: example.tcl does not exist, try again i then gave the command $ns example.tcl in the terminal and it gave the following error message: bash: /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: Permission denied what can possibly be going wrong? if you need more info on my problem please let me know in case i left something out. thank you in advance guys |
Hi
Did you check the files' permissions? You didn't tell about that. And BTW, if you 'source' your bash config file, there is no need to reboot. |
hi mojo
thank you for replying. no i did not check the files permissions. how can i do that? i also validated it and it came up with validate overall report: some portable tests failed: ./test-all-simple ./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./test-all-simple-full ./test-all-full ./test-all-testReno-full ./test-all-testReno-bayfull ./test-all-sack-full ./test-all-tcp-init-win ./test-all-tcpVariants ./test-all-LimTransmit ./test-all-aimd ./test-all-greis ./test-all-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-sctp ./test-all-tcpLinux ./test-all-tcpHighspeed ./test-all-frto ./test-all-friendly ./test-all-realaudio ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-diffusion3 ./test-all-smac ./test-all-manual-routing ./test-all-lan ./test-all-red ./test-all-adaptive-red ./test-all-red-pd ./test-all-rio ./test-all-vq ./test-all-rem ./test-all-gk ./test-all-pi ./test-all-cbq ./test-all-schedule ./test-all-rr ./test-all-monitor ./test-all-jobs ./test-all-intserv ./test-all-diffserv ./test-all-webtraf ./test-all-mip ./test-all-links ./test-all-linkstate ./test-all-mpls ./test-all-oddBehaviors ./test-all-WLtutorial ./test-all-wireless-infra ./test-all-wireless-infra-mobility ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-gridkeeper ./test-all-wireless-diffusion ./test-all-wireless-lan-newnode ./test-all-wireless-lan-newnode-80211Ext ./test-all-source-routing ./test-all-misc ./test-all-tagged-trace ./test-all-message ./test-all-rng ./test-all-wpan ./test-all-energy ./test-all-snoop ./test-all-packmime ./test-all-delaybox ./test-all-tmix some non-portable tests also failed: ./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-simultaneous ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma ./test-all-satellite to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME and after i tried to run the specific test it came up with bash: ./test-all-TEST-NAME: No such file or directory what do i do thanks in advance |
hi again guys,
i think i managed to overcome the problem i had before. i used the command chmod u+x filename in the terminal and then run the following program set ns [new Simultator] set n0 [$ns node] set n1 [$ns node] $ns duplex-link $n0 $n1 1Mb 10ms DropTail set tracefile [open out.tr w] $ns trace-all $tracefile set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns tracefile nf $ns flush-trace close $nf close $tracefile exec nam out.nam & exit 0 } $ns at 5.0 "finish" $ns run by typing $ns example.tcl in the terminal but i got the following errors. /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 6: duplex-link: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 9: trace-all: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 12: namtrace-all: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 14: proc: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 16: global: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 17: flush-trace: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 18: close: command not found /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 19: close: command not found bambos@bambos-laptop:~/ns-allinone-2.34/ns-2.34$ Cannot connect to existing nam instance. Starting a new one... nam: Unable to open the file "out.nam.nam" can someone please tell me what went wrong? thanks a lot mates |
1 Attachment(s)
Welcome to LQ. .. :) .. .. .. LQ Search → 'Tag Name' = ns2
Template and examples, post # 4 here http://www.linuxquestions.org/questi...blem-726993/#4 And please use code tags: [/code] at text end, [code] at text begin. http://www.linuxquestions.org/questi....php?do=bbcode Your modified file is attached as "mate1984example.tcl.txt ( Formatting was changed. May not work as you intended ? But it will display in nam.) P.S. : I don't know, why your validation fails, usually no errors with ns-allinone-2.34 at Ubuntu 8.04 Hardy. Will test it later. |
ns-allinone-2.34 .. Ubuntu 8.04 Hardy
Required : libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool
And this may fix your issues ? : sudo apt-get remove tcl8.3 tcl8.4 tcl8.5 .. Will prevent ns2 applications from compiling with any system tcl, tk. (You can install tcl8.4 tk8.4 , when ns2 install and validate are finished.) sudo apt-get install g++ libstdc++6 libstdc++6-4.2-dev libc6-dev .. to be sure, they are updated. 'validate' result : Code:
Test output agrees with reference output |
hi again guys,
first of all thanks for the time and effort you put in helping me. unfortunately i still can't get it to run. dear knudfl it seems that i don't have libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool. how can i get them i case that is what is causing all my problems. also i gave the command sudo apt-get remove tcl8.3 tcl8.4 tcl8.5 and i got the following Reading package lists... Done Building dependency tree Reading state information... Done Package tcl8.3 is not installed, so not removed Package tcl8.4 is not installed, so not removed Package tcl8.5 is not installed, so not removed The following packages were automatically installed and are no longer required: linux-headers-2.6.24-19-generic libdns35 linux-headers-2.6.24-19 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. i then proceeded to giving the command sudo apt-get install g++ libstdc++6 libstdc++6-4.2-dev libc6-dev and got the following Reading package lists... Done Building dependency tree Reading state information... Done g++ is already the newest version. libstdc++6 is already the newest version. libstdc++6-4.2-dev is already the newest version. libc6-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. i also tried to install tcl8.4/tk8.4 and i got Reading package lists... Done Building dependency tree Reading state information... Done E: Release 'tk8.4' for 'tcl8.4' was not found i still can get any program to run. is it advisable to uninstall ns2 and reinstall it again in case something went wrong there or i didn't get all the file necessary? again thanks a lot for your time mate. |
The command is of course :
sudo apt-get install tcl8.4 tk8.4 Also easier to find valid package names, by doing this first: sudo apt-cache search tcl8.4 .. Or use the "package search site" Example : http://packages.ubuntu.com/hardy/tcl8.4 ( Or use the search in 'synaptic ) ... Sorry, if I confused you with the tcl/tk "word". But : Do not install tcl8.4 tk8.4 before building ns2. I do not know, what your 'validation' issue is now. Suggest : Delete all ns-allinone-2.34 and start from scratch, and : cd ns-allinone-2.34/ && ./install .. |
hi guys,
i have just reinstalled ns 2.34. the validation issue was overcome but i am still not able to run a single code with the same errors. every time i give the command ns myfile.tcl it keeps telling my that no such file or directory exists. on the other hand if i change the command to $ns myfile.tcl it gives the error permission denied. nothing seems to be happening. any suggestions. thanks a lot again for your time |
hi mates
i don't know how to thank you everything seems to be working just fine. thanks a lots |
make command error
hello
am getting problem with ./configure getting error like this /ns-allinone-2.34/ns-2.34$ ./configure ./configure: line 1520: config.log: Permission denied ./configure: line 1530: config.log: Permission denied i tried to enable permission its denied? how can solve this? :banghead: |
Post #12, @yashu.
Install ns-allinone-2.34 in /home/yashu/ (Or any folder in /home/yashu/) Then there should be no more permission issues. By the way : Why are you using './configure' in ns-2.34/ ? ? . |
ns2
to perform otcl linkage
1) i have to exe ./configure 2)make 3) make clear am trying to exe these commands |
obstacle in ns2
hi,
i want obstacle model in ns2.33,how can i add? please help me |
# 14.
Probably have a look here http://moment.cs.ucsb.edu/mobility/ > http://moment.cs.ucsb.edu/mobility/R...tacleModel-NS2 > Libraries http://moment.cs.ucsb.edu/mobility/libraries.html > Plugins http://moment.cs.ucsb.edu/mobility/plugins.html Don't know which ns2 it's for, but then again : You can have as many versions of ns-allinone-2.xx as you want, installed at the same time. But do not add any of them to a *PATH. Other info : Google .. ns2 obstacle model .. . |
All times are GMT -5. The time now is 02:27 AM. |