ITeye博客

在ubuntu中安装 Source-Navigator及使用手册(转)

libaohan · 2010-05-20 17:35 · Linux · 操作系统 · Markdown

在ubuntu中安装 Source-Navigator及使用手册(zz) 2009-09-25 23:19 from : http://hi.baidu.com/xiaohu_tiger/blog/item/66d207888431d6b40f2444ec.html

1 通过apt-get安装(版本较旧) 安装命令:sudo apt-get install sourcenav 启动命令:snavigator

2 手动安装最新版本 1)到官方网站获取软件包 http://sourceforge.net/project/showfiles.php?group_id=51180 2)解压缩 tar zxvf s ourcenav-6.0.tar.gz ./configure --prefix=/opt/sourcenav (install 文件推荐参数) make make install ps:如果出现权限问题,前面加sudo 3)如果碰到下述错误 /root/tk8.4.16/unix/../generic/tk3d.c:1279: error: ‘TkBorder’ has no member named ‘resourceRefCount’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘display’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘screenNum’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘TkBorder’ has no member named ‘screen’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘Tk_FakeWin’ has no member named ‘atts’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘TkBorder’ has no member named ‘colormap’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1306: error: ‘TkBorder’ has no member named ‘nextPtr’ 。。。。。。 则在终端是输入:sudo apt-get install libx11-dev 4) 启动snavigator 在终端直接输入:snavigator 5) 使用手册(user manual) http://sourcenav.sourceforge.net/online-docs/userguide/index_ug.html 还有一个 source insight 和source navigator的比较的帖子: http://fky168.blog.163.com/blog/static/3786097200831033957620/

======================================================== 运行source navigator的问题 方法一、(转载) 安装完成后运行 snavigator 提示

snavigator

Can't find a usable tk.tcl in the following directories: /usr/local/share/tk8.3

/usr/local/share/tk8.3/tk.tcl: no event type or button # or keysym no event type or button # or keysym while executing "bind Listbox { %W yview scroll units }" (file "/usr/local/share/tk8.3/listbox.tcl" line 182) invoked from within "source " invoked from within "if { &&
} { source so..." (file "/usr/local/share/tk8.3/tk.tcl" line 30 invoked from within "source /usr/local/share/tk8.3/tk.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 "

This probably means that tk wasn't installed properly.

不知其所以然,重新安装tk8.3无效,升级到tk8.5无效

后来在网上发现需要给下载的Source-Navigator 6.0打补丁 到http://bugs.gentoo.org/show_bug.cgi?id=225999 找到 tk-8.4-lastevent.patch 补丁 将补丁粘贴到source navigator 源码目录 sourcenav-6.0/tk目录下,再cd 到sourcenav-6.0/ tk 的源码目录 patch -p0 -i tk-8.4-lastevent.patch 删除安装,重新安装,可以运行了(我试了一下不行)。

方法二、(转载) 有找到解法: (http://forums.fedoraforum.org/showthread.php?t=213441) 註掉 lines 182-184 in the file /opt/sourcenav/share/tk8.3/listbox.tcl 註掉 lines 457-459 in the file /opt/sourcenav/share/tk8.3/text.tcl

在panel中添加Launcher,在Command中添加/opt/sourcenav/bin/snavigator

====== 安裝完後在桌面增加捷徑的方法 ====== 我要做捷徑的目標是/opt/sourcenav/bin/snavigator (這是個sh script) 裡面要改一行 #snbindir=dirname $0 snbindir=/opt/sourcenav/bin 這樣再建一個捷徑到桌面即可: ln -s /opt/sourcenav/bin/snavigator ~/Desktop/

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。