LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   install ns2 (https://www.linuxquestions.org/questions/linux-software-2/install-ns2-4175429285/)

manikandan.h 09-27-2012 06:02 AM

install ns2
 
I try to install ns2 2.32 in ubuntu. It show the followinf error. How to clear it.
gcc -c -O2 -pipe -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../bitmaps -I/home/manikandan/ns2/ns-allinone-2.32/tcl8.4.15/generic -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DSTATIC_BUILD=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DSTDC_HEADERS=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c
In file included from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tkInt.h:21:0,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.h:18,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c:16:
/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk.h:83:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.4.15 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

knudfl 09-27-2012 01:48 PM

Welcome to LQ.

About your error : Missing x11/Xlib files.
"libxmu-dev" will take care that they all get installed :

sudo apt-get install \
g++ autoconf automake libtool libxmu-dev patch xgraph


? More questions ? Then please specify the Ubuntu version and architecture.
Version command : cat /etc/issue
Architecture command : uname -m

.

manikandan.h 09-28-2012 11:44 AM

Thanks for supporting..

I tried that code. But it couldn't successful. It shows autoconf, automake, etc.. : No such file or directory

I am using ubuntu version : Ubuntu 11.04
Architecture : i 686

knudfl 09-28-2012 01:04 PM

Quote:

No such file or directory
Doesn't look like a reply from 'apt-get install *** '

Please try one more time ...
Code:

sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph

manikandan.h 09-28-2012 10:55 PM

Quote:

Originally Posted by knudfl (Post 4791788)
Doesn't look like a reply from 'apt-get install *** '

Please try one more time ...
Code:

sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph


I try the above code. It give the following message.
manikandan@manikandan-TM4750:~$ sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
manikandan@manikandan-TM4750:~$

manikandan.h 09-29-2012 12:37 AM

Thank you .. for your kind help.
Now the code is working properly. I have successfully installed ns2. At the time my laptop wi-fi connection was in Off Mode.

Thank you lot........................

manikandan.h 10-29-2012 01:43 AM

install ns2 on rhel
 
I try to install ns2 2.27 on RHEL. It give the following error. I need the solution.


7/otcl-1.8 -I/home/ns-allinone-2.27/include -I/home/ns-allinone-2.27/include -o Tcl.o Tcl.cc
In file included from tclcl.h:48,
from Tcl.cc:47:
tclcl-mappings.h: In static member function `static int TclObjectHelper<T>::dispatch_(void*, Tcl_Interp*, int, char**)':
tclcl-mappings.h:51: error: incomplete type `Tcl' used in nested name specifier
tclcl-mappings.h:52: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
tclcl-mappings.h:57: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
make: *** [Tcl.o] Error 1
tclcl-1.15 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

knudfl 10-29-2012 03:56 AM

#7 : Redhat EL 5.x and EL 6x : # yum install compat-gcc-34-c++

ns-2.27-gcc410.patch http://www.linuxquestions.org/questi...8&d=1271439105

tar xvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch
cd ns-allinone-2.27/
export CC=gcc34 CXX=g++34
./install


.

manikandan.h 10-30-2012 01:30 AM

install ns2 on rhel
 
I am using RHEL 4

I try to install ns2 2.27. what is the compatible gcc for RHEL4

knudfl 10-30-2012 02:49 AM

# 9 : RHEL 4, The default compiler is gcc/g++ version 3.4.6, i.e. OK.

tar zxvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch
cd ns-allinone-2.27/
./install : No errors.
Probably start from scratch with a new unpacked ns-allinone-2.27.tar.gz.
... And follow the above strictly.
( The patch is applied outside ns-allinone-2.27/ ).

.

manikandan.h 10-30-2012 04:59 AM

Installing ns2 - reg
 
Dear Sir,
I try to install ns2 2.27. But in the gcc itself shows some error..

Please find the error messages after upgrade the gcc34...
checking whether the C compiler (gcc34 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
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.
[root@Prithvi ns-allinone-2.27]# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
[root@Prithvi ns-allinone-2.27]#

knudfl 10-30-2012 05:09 AM

# 11 : gcc cannot be used, when gcc only is installed.
The c++ compiler is required too. Package name : 'gcc-c++'.


Why are you using the obsolete RHEL 4 for ns2 ?
Ubuntu 11.04, ref. post # 3 is better suited for ns-2.27, I think.
Ubuntu 11.04, ns226 .. ns234 compiler : gcc41-compat + g++41-compat :
http://www.linuxquestions.org/questi...571/page2.html
> Post # 17

.

manikandan.h 10-30-2012 05:18 AM

In our Lab we are using RHEL. The students are accessed through Telnet. Is there possible to access the ns2 through TelNet?

manikandan.h 10-30-2012 06:21 AM

I have successfully installed ns2. Thank you....


All times are GMT -5. The time now is 07:47 AM.