fedora 下ns2安装完后提示没有xgraph的解决办法
2015-04-21 17:02
621 查看
Xgraph is not considered important, that's why " ./install "
just ignores it by errors. ( xgraph files =
9 years old.)
It may be possible to compile it, by using the Ubuntu patch ?
http://packages.ubuntu.com/karmic/xgraph
[xgraph_12.1-11.diff.gz]
But much easier is :
sudo apt-get install xgraph ygraph
'ygraph' is a modern, more advanced tool ..
http://packages.ubuntu.com/karmic/ygraph
.....
==================== 上面的是ubuntu下的解决办法
问题是在fedora 下使用yum install xgraph不能找到xgraph的安装包
解决办法:
进入未编译的ns-allinone-2.33/xgraph-12.1目录下
敲./configrue
接着make
但是出现如下错误;
--------------------------------------------------------------------------
[root@cj xgraph-12.1]# make
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c xgraph.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c xgX.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c hard_devices.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c dialog.c
dialog.c: 在函数‘make_msg_box’中:
dialog.c:780: 警告:传递‘getline’的第 2 个参数时在不兼容的指针类型间转换
/usr/include/stdio.h:653: 附注:需要类型‘size_t * __restrict__’,但实参的类型为‘char *’
dialog.c:780: 错误:提供给函数‘getline’的实参太少
dialog.c: 在函数‘getline’中:
dialog.c:899: 错误:实参‘lptr’与原型不符
/usr/include/stdio.h:653: 错误:原型声明
dialog.c:899: 错误:实参数目与原型不符
/usr/include/stdio.h:653: 错误:原型声明
make: *** [dialog.o] 错误 1
----------------------------------------------------------------------
原因:
The standard lib (stdio.h) function getline has been redefined in <installdir>/ns-allinone-2.31/xgraph-12.1/dialog.c. Quick fix: Edit the file and change the two references to getline to something else, e.g. getmyline. Then the program builds...
就是说,把dialog.c中的 所有geline替换成getmyline
接着make.
make完后
make install
别忘了在.bashrc 中添加环境变量哦。
如下:
[xhtml] view
plaincopyprint?
OTCL_LIB=/home/cj/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/cj/ns-allinone-2.33/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/cj/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
#PATH
XGRAPH=/home/cj/ns-allinone-2.33/bin:/home/cj/ns-allinone-2.33/tcl8.4.18/unix:/home/cj/ns-allinone-2.33/tk8.4.18/unix
NS=/home/cj/ns-allinone-2.33/ns-2.33
TCL=/home/cj/ns-allinone-2.33/tcl8.4.18/library
NS_=/usr/local/bin
PATH=$PATH:$XGRAPH:$NAM:$TCL_:NS_
#fin pour NS2
别忘了把用户名换成你自己的: )
测试:
进入ns-allinone-2.33/xgraph-12.1/examples目录下
敲:
xgraph bar.xg
你会看到如下形:
success
enjoy it!
just ignores it by errors. ( xgraph files =
9 years old.)
It may be possible to compile it, by using the Ubuntu patch ?
http://packages.ubuntu.com/karmic/xgraph
[xgraph_12.1-11.diff.gz]
But much easier is :
sudo apt-get install xgraph ygraph
'ygraph' is a modern, more advanced tool ..
http://packages.ubuntu.com/karmic/ygraph
.....
==================== 上面的是ubuntu下的解决办法
问题是在fedora 下使用yum install xgraph不能找到xgraph的安装包
解决办法:
进入未编译的ns-allinone-2.33/xgraph-12.1目录下
敲./configrue
接着make
但是出现如下错误;
--------------------------------------------------------------------------
[root@cj xgraph-12.1]# make
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c xgraph.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c xgX.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c hard_devices.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c dialog.c
dialog.c: 在函数‘make_msg_box’中:
dialog.c:780: 警告:传递‘getline’的第 2 个参数时在不兼容的指针类型间转换
/usr/include/stdio.h:653: 附注:需要类型‘size_t * __restrict__’,但实参的类型为‘char *’
dialog.c:780: 错误:提供给函数‘getline’的实参太少
dialog.c: 在函数‘getline’中:
dialog.c:899: 错误:实参‘lptr’与原型不符
/usr/include/stdio.h:653: 错误:原型声明
dialog.c:899: 错误:实参数目与原型不符
/usr/include/stdio.h:653: 错误:原型声明
make: *** [dialog.o] 错误 1
----------------------------------------------------------------------
原因:
The standard lib (stdio.h) function getline has been redefined in <installdir>/ns-allinone-2.31/xgraph-12.1/dialog.c. Quick fix: Edit the file and change the two references to getline to something else, e.g. getmyline. Then the program builds...
就是说,把dialog.c中的 所有geline替换成getmyline
接着make.
make完后
make install
别忘了在.bashrc 中添加环境变量哦。
如下:
[xhtml] view
plaincopyprint?
OTCL_LIB=/home/cj/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/cj/ns-allinone-2.33/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/cj/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
#PATH
XGRAPH=/home/cj/ns-allinone-2.33/bin:/home/cj/ns-allinone-2.33/tcl8.4.18/unix:/home/cj/ns-allinone-2.33/tk8.4.18/unix
NS=/home/cj/ns-allinone-2.33/ns-2.33
TCL=/home/cj/ns-allinone-2.33/tcl8.4.18/library
NS_=/usr/local/bin
PATH=$PATH:$XGRAPH:$NAM:$TCL_:NS_
#fin pour NS2
别忘了把用户名换成你自己的: )
测试:
进入ns-allinone-2.33/xgraph-12.1/examples目录下
敲:
xgraph bar.xg
你会看到如下形:
success
enjoy it!
相关文章推荐
- 关于ubuntu16.4 中安装最新的eclipse或者是STS出现页面特卡,且新建项目没有提示,preference选项中点击左侧标签右侧没反应的解决办法,参照google, 排版不太好,希望对一些小伙伴有所帮助
- Qt Creator提示"Qt没有被正确安装,请运行make install"的解决办法
- Android SDK tools安装失败, Win7修改保存Hosts提示没有管理员权限的解决办法
- vmware server 6.0安装提示指定的vcenter server没有“作为服务器登陆“特权解决办法
- 安装node-sass提示没有vendor目录的解决办法
- 安装Sql server 2008时提示没有安装.net 3.5的解决办法
- 在Windows Server 2012 R2上安装SharePoint 2013 with SP1失败,提示没有.net4.5的解决办法
- ubuntu 明明安装了flash player plugin ,但提示没有安装,解决办法
- Eclipse安装了SpringSource Tool Suite插件后,编辑SpringBoot项目的yml配置文件仍然没有提示信息的解决办法
- Android最新的 SDK安装过程中提示JDK没有安装的解决办法。
- fedora下安装MP3,视频解码器提示 No package,,,,,,,,,,,available解决办法
- 安装Ubuntu版本linux过程中没有提示设置root用户密码问题的解决办法
- 【搜集】Canopus ProCoder 2安装不了,老是提示没有足够空间的解决办法
- pe模式安装win7(32位)的时候出现“安装程序无法定位现有系统分区,也无法创建新的系统分区”提示,网上很多对此问题没有很好的解决办法
- 安装linux系统之后,开机时没有Windows系统选项的解决办法(Ubuntu,Deepin,Centos,Redhat,Fedora)
- composer安装fxp插件时候提示内存不足且没有交换空间的解决办法
- 【吐血写此博】Fedora14下eclipse进行android开发,ibus提示没有输入窗口的 解决办法
- MyEclipse写Ext js 没有自动提示 解决办法/MyEclipse怎么安装spket插件
- Joomla! 无法安装,提示您的浏览器没有启用Cookies的解决办法
- dell本安装fedora13不能正常关机和重启及升级内核提示“no root device found...."解决办法