ubuntu下安装ns2出错(二)

虽然安装gcc后,再安装ns2,tcl的安装很顺利,但是安装tk时,出现以下提示信息:
error: X11/Xlib.h: No such file or directory

缺少X11/Xlib.h,在网上搜索时看到有人在问如何安装x11开发库的问题
命令为: apt-get install libx11-dev
在机子上试了一下,还是不行,又出现以下错误:
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... no
checking standard STL is available... no
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.4... -L../lib -ltcl8.4
checking for init.tcl... ../lib/tcl8.4
checking for http.tcl... ../lib/tcl8.4/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.4.11... no
checking for tclsh8.4... ../bin/tclsh8.4
checking for tk.h... -I../include
checking for libtk8.4... -L../lib -ltk8.4
checking for tk.tcl... ../lib/tk8.4
checking for X11 header files
can't find X includes
otcl-1.12 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
还是没有得到解决.
总之,问题的焦点是缺少x11,所以先确保包含x11的包都正确地安装,应该就可以解决了.
先输入:sudo apt-cache search x11-dev
得到以下信息:
libx11-dev - X11 client-side library (development headers)
xlibs-dev - X Window System client library development files transitional package
libghc6-x11-dev - Haskell X11 binding for GHC
libooc-x11-dev - X11 specific modules for the oo2c compiler (devel)
libgl1-mesa-swx11-dev - A free implementation of the OpenGL API -- development support files

分别用下列命令安装:
sudo apt-get install libx11-dev
sudo apt-get install xlibs-dev
sudo apt-get install libghc6-x11-dev
sudo apt-get install libooc-x11-dev

安装完后,再安装ns2.终于正确地安装了ns2.兴奋中~~~~
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值