Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Then :
cd ns-allinone-2.34/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
( No need to edit any Makefile's, when the command
'export CC=gcc-4.4 CXX=g++-4.4' is used.)
Yeah I thought it was the about gcc and g++ as well
So I did try to update them!and the exact version
Of my cc is 4.4, But nothing comes out of it
! But will try it again and let you know soon!
Thanks one more time
Then :
cd ns-allinone-2.34/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
( No need to edit any Makefile's, when the command
'export CC=gcc-4.4 CXX=g++-4.4' is used.)
i thought it was a permission error while doing ./install so i got to do sudo ./install, and it gives me the random.o problem again. i will remove all the gcc and try to update and export to see
.
well now am getting this message
Code:
tcl8.4.18 make succeeded.
Warning: tclStubInit.c may be out of date.
Developers may want to run "make genstubs" to regenerate.
This warning can be safely ignored, do not report as a bug!
Installing libtcl8.4.a to /home/williams/ns-allinone-2.34/lib/
cp: cannot create regular file `/home/williams/ns-allinone-2.34/lib/#inst.4575#': Permission denied
rm: cannot remove `/home/williams/ns-allinone-2.34/lib/libtcl8.4.a': Permission denied
mv: cannot stat `/home/williams/ns-allinone-2.34/lib/#inst.4575#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.4.18 installation failed.
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
? May be the "Erlend edits" won't work with Ubuntu 12.04 ?
( You could try to follow his advices strictly.)
But : Better start from scratch with a new unpacked
ns-allinone-2.34.tar.gz for every retry.
Alternatively : 'make clean' in all applications,
and delete all the generated 'Makefile', if any.
( tcl8.4.18/unix/, tk8.4.18/unix/, otcl*/, tclcl*/ etc. etc.)
The method I am using : A gcc41-compat*, gcc version 4.1.2.
A 32bits Ubuntu 12.04 is required. No edits at all, ns-2.34.
( gcc41-compat* / g++41-compat works with ns-allinone -2.27..-2.34 ).
The command 'uname -m' will reply with your architecture :
i686 (32bits) or x86_64 (64bits).
? May be the "Erlend edits" won't work with Ubuntu 12.04 ?
( You could try to follow his advices strictly.)
But : Better start from scratch with a new unpacked
ns-allinone-2.34.tar.gz for every retry.
Alternatively : 'make clean' in all applications,
and delete all the generated 'Makefile', if any.
( tcl8.4.18/unix/, tk8.4.18/unix/, otcl*/, tclcl*/ etc. etc.)
The method I am using : A gcc41-compat*, gcc version 4.1.2.
A 32bits Ubuntu 12.04 is required. No edits at all, ns-2.34.
( gcc41-compat* / g++41-compat works with ns-allinone -2.27..-2.34 ).
The command 'uname -m' will reply with your architecture :
i686 (32bits) or x86_64 (64bits).
.
yeah i have started from crash and it has installed perfectly (had to fix some bugs --ranvar.o, Mac-802.11Ext.h..), now am setting my environment and adding some new protocols /modules and i hope it wont bug again! let you know when am done . thanks one more time
new error
when i do : Make clean it says permission denied, so i sudi su
then after make clean , i did "make depend" which gives me the following error
Code:
root@williams-Veriton-M680G:/home/williams/ns-allinone-2.34/ns-2.34# make dependmake: *** No rule to make target `tcp/linux/tcp_naivereno.cc', needed by `depend'. Stop.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
#7
Quote:
Make clean
It's 'make clean', not 'Make clean'.
And : If you use 'sudo' ( or root ) for any commands in
home/williams/ns-allinone-2.34/ns-2.34 : Troubles to come,
i.e. you will have no access as unprivileged user.
May be you will have to start from scratch, and then: no sudo at all.
Quote:
`tcp/linux/tcp_naivereno.cc'
There is no tcp/linux/tcp_naivereno.cc, but tcp/linux/tcp_naivereno.c
.. Unless you added a file.cc ?
It's 'make clean', not 'Make clean'.
And : If you use 'sudo' ( or root ) for any commands in
home/williams/ns-allinone-2.34/ns-2.34 : Troubles to come,
i.e. you will have no access as unprivileged user.
May be you will have to start from scratch, and then: no sudo at all.
There is no tcp/linux/tcp_naivereno.cc, but tcp/linux/tcp_naivereno.c
.. Unless you added a file.cc ?
.
indeed i checked in the directory and there isnt , idont know why this error is anoying me, ..for 'make' its a mistake while i was typing this post ,i know that its not capital "M"... but good news everything is working fine and i can keep on with my simulation...
thank you so much i mark it as solved
you right about the sudo thing. the root will lock it but for now i will just finish what i have to do and start over again. ;-)
I also found out that there is no naivereno.cc but naivereno.c. so now what to do, and how to make the "make depend" work properly , pls help , i am new to ns2 and fedora
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post #10 , @Mayank2933 : Welcome to LQ.
'make depend' is something that is done automatically,
with the ./install command in the top directory.
No reason to repeat the 'make depend', if you redo e.g.make in ns-2.xx/.
I know that somebody wrote 'make depend' in a paper (many?) years ago,
and that a lot of students just repeat writing 'make depend' in their "copy advise".
But I have never experienced a situation where it actually was required.
Conclusion : Skip 'make depend'. Or run ./install , if you edited Makefile.in .
'make depend' is something that is done automatically,
with the ./install command in the top directory.
No reason to repeat the 'make depend', if you redo e.g.make in ns-2.xx/.
I know that somebody wrote 'make depend' in a paper (many?) years ago,
and that a lot of students just repeat writing 'make depend' in their "copy advise".
But I have never experienced a situation where it actually was required.
Conclusion : Skip 'make depend'. Or run ./install , if you edited Makefile.in .
-
Thanks a lot knudfl, it was great to have quick reply .
Actually i have installed ns2.34 successfully. now i have to add leach to it. I have downloaded leach code and installing file from http://arungupta.co.in/blog/?p=113 and, now after skipping make depend, and running make i am getting this error :
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 12 .
Quote:
... mit/rca/energy.o: Permission denied
.
what can be the possible flaw and how may i remove it
The permissions are looking OK here in the "ns-234-leach-arungupta" package.
? Did you unpack the files with $ sudo tar xvf ns-234-leach.tar.gz ?
.. Then you have no access to all the files. No "sudo" in ns2, please.
Suggest : cd mit/rca/ , and then delete the old unusable <files>.o
.. And the same in mit/uAMPS/.
.. Then you have no access to all the files. No "sudo" in ns2, please.
Suggest : cd mit/rca/ , and then delete the old unusable <files>.o
.. And the same in mit/uAMPS/.
-
no sudo is used in the shell script. for the above problem i changed to root user and then tried , it worked this time. But now i have another problem . According to the blog i should get some specific error upon running ./leach_test , but that error is not showing up in leach.err. instead the error is :
./leach_test: line 37: ns: command not found
but still i tried to run leach.out . and here it says again permission denied.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 14 .
May be no 'ns' was ever created ?
If the file ns-allinone/ns-2.34/ns is present, please do :
$ cd ns-allinone/ns-2.34/ && sudo make install
.. I.e. 'make install' will copy ns to a system PATH = /usr/local/bin/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.