ns2.33 nam [code omitted because of length] 错误

本文解决NS2.33安装后调用nam出现的错误,提供了一个补丁下载链接,并详细介绍了如何应用补丁及重新安装ns-2.33的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

装好NS2.33后,当调用nam时,出现如下错误
[code omitted because of length]
: no event type or button # or keysym
    while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
    invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."

 

这个是由于nam调用的tk组件和xproto-7.0.13不兼容导致的(xproto-7.0.13 新添加了 GenericEvent)。 解决方法:
到这里下载补丁http://bugs.gentoo.org/show_bug.cgi?id=225999
或者新建一个记事本复制一下内容到里面,保存,命名为“tk-8.4.18-tkBind.patch”(将.txt后缀名改为.patch)
--- tk8.4.18-orig/generic/tkBind.c 2006-07-21 08:26:54.000000000 +0200
+++ tk8.4.18/generic/tkBind.c 2008-07-05 12:17:10.000000000 +0200
@@ -586,6 +586,9 @@
       COLORMAP,
       0,
       0,
+#ifdef GenericEvent
+       0,
+#endif
        VIRTUAL,
             ACTIVATE,
           ACTIVATE,)

然后在ns-allinone-2.33下运行patch -p0 < tk-8.4.18-tkBind.patch

会出现:

直接把补丁放在ns-allinone-2.33下运行就行~tk8.4.18/generic/tkBind.c

 

can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- tk8.4.18-orig/generic/tkBind.c    2006-07-21 08:26:54.000000000 +0200
|+++ tk8.4.18/generic/tkBind.c    2008-07-05 12:17:10.000000000 +0200
--------------------------
File to patch:
然后去查找需要打补丁的文件tkBind.c,它在NS2.30中的位置是~/ns-allinone-2.30/tk8.4.13/generic

在“File to patch: ”后填写好路径名和文件名,打上补丁。

然后重装ns-2.33。

 

 

 

最后,需要将ns-2.33中的“ns”和nam-1.12中的“nam”拷贝到/usr/local/bin下面。

这样就能正常调用ns和nam了。

 

 

 

Thanks to : http://blog.sina.com.cn/s/blog_4c8287230100h5g5.html

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值