2012年1月11日 星期三

fedora 10 & rar檔

以前明明直接用yum就可以裝unrar, 可是剛剛卻發現不能安裝 (找不到套件)

所以要改成手動安裝了 科科~

直接打:
wget ftp://fr2.rpmfind.net/linux/rpmfusion/nonfree/fedora/releases/10/Everything/i386/os/unrar-3.7.8-3.fc10.i386.rpm

然後安裝:
rpm -ivh unrar-3.7.8-3.fc10.i386.rpm


就可以用unrar來解壓縮檔案了 XD
unrar x filename.rar

2012年1月5日 星期四

Fedora10 & ns-2.29

在安裝ns-allinone-2.29.2的時候, 會出現一些錯誤訊息

ex:
common/packet.h:231: warning: deprecated conversion from string constant to 'char*'
還有
'typedef' was ignored in this declaration

然後在這邊看到一些討論

改一下Makefile似乎就安裝成功了 = =+

簡單說:
先確定電腦上有gcc34和g++34, 沒有的話就用yum裝一下
yum install compat-gcc-34-c++

然後去修改ns-2.29/Makefile.in

把line 36, 37的
CC = @CC@
CPP = @CXX@

改成
CC = gcc34
CPP = g++34

再去./install就成功了 XD

20120314補充:
packet.h那個錯誤訊息, 可以在Makefile的CCOPT後面加上-Wno-write-strings這個參數解決.
http://nsnam.isi.edu/nsnam/index.php/Troubleshooting

================================================

補充: nam似乎安裝失敗, 可能也要改它的makefile吧 (我用不到, 沒差 XD)

以下是log:

Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.11: /ns2/ns-allinone-2.29/{bin,include,lib}
tk8.4.11: /ns2/ns-allinone-2.29/{bin,include,lib}
otcl: /ns2/ns-allinone-2.29/otcl-1.11
tclcl: /ns2/ns-allinone-2.29/tclcl-1.17
ns: /ns2/ns-allinone-2.29/ns-2.29/ns
xgraph: /ns2/ns-allinone-2.29/xgraph-12.1
gt-itm: /ns2/ns-allinone-2.29/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------

Please put /ns2/ns-allinone-2.29/bin:/ns2/ns-allinone-2.29/tcl8.4.11/unix:/ns2/ns-allinone-2.29/tk8.4.11/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /ns2/ns-allinone-2.29/otcl-1.11, /ns2/ns-allinone-2.29/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=

(2) You MUST put /ns2/ns-allinone-2.29/tcl8.4.11/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.11
and tk8.4.11. They are now installed under /ns2/ns-allinone-2.29/{bin,include,lib}

After these steps, you can now run the ns validation suite with
cd ns-2.29; ./validate