在ubuntu中安裝 Source-Navigator及使用手冊(zz)

轉自: http://hi.baidu.com/xiaohu_tiger/blog/item/66d207888431d6b40f2444ec.html1

通過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 提示
[root@MagicLinux sourcenav-6.0]# 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 <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
(file "/usr/local/share/tk8.3/listbox.tcl" line 182)
invoked from within
"source [file join $tk_library listbox.tcl]"
invoked from within
"if {[string compare $tcl_platform(platform) "macintosh"] && /
[string compare {} $tk_library]} {
source [file join $tk_library button.tcl]
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 [list source $file]"


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/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章