Windows7+VMWare7.0+Ubuntu10.0+NS-2.33 Installation Log

来源:互联网 发布:nginx是什么 编辑:程序博客网 时间:2024/05/17 02:39
  1. Download and Install VMWare, Ubuntu.iso
  2. Do the following:

        sudo apt-get install build-essential

        sudo apt-get install tcl8.4

        sudo apt-get install tcl8.4-dev

        sudo apt-get install tk8.4

        sudo apt-get install tk8.4-dev

        sudo aptget install libxmu-dev

    using "gcc -v" to check gcc version (e.g. 4.4.5),then install g++ with the same version

        sudo aptget install g++ 4.4.5. if not available, direclty type "g++", without version
  3. tar -vxzf ns-allinone-2.33.tar.gz
  4. install the pacth, in case the error (when using nam) like the following:
    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 {[string equal [tk windowingsystem] "classic"]
    || [string equal [tk windowingsystem] "aqua"]} {
    bind Listbox <MouseWheel> {
    %W yview scroll [expr {..." 
     
    solution:
    1).http://bugs.gentoo.org/show_bug.cgi?id=225999, download patch
    2). under "ns-allinone-2.33", patch -p0 < tk-8.4.18-tkBind.patch 
    3). under "ns-allinone-2.33>tk8.4.18",  patch -p0 < tk-8.4.lastevent.patch 
  5. 1).$ cd /home/ns-allinone-2.33/otcl-1.13

         $ sudo gedit configure.in

         modify at " Linux *)":

             SHLIB_LD="ld -shared",

         as 

             SHLIB_LD="gcc -shared"

     2).$ sudo gedit configure

         modify at "Linux *)"

             SHLIB_LD="ld -shared",

         as 

             SHLIB_LD="gcc -shared"

     3).change ns-allinone-2.34/otcl-1.13/Makefile.in

         CC =@CC@

         CC =gcc-4.4 (ur current version)

     4). enter ns-allinone-2.33
          ./install
  6. setup path environment

      gedit ~/.bashrc  

      at the end of the file, type the following

    (note:/home/NS is ur own path for ns-allinone-2.33

     # LD_LIBRARY_PATH

    OTCL_LIB=/home/NS/ns-allinone-2.33/otcl-1.13

    NS2_LIB=/home/NS/ns-allinone-2.33/lib

    X11_LIB=/usr/X11R6/lib

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB

     

    # TCL_LIBRARY

    TCL_LIB=/home/NS/ns-allinone-2.33/tcl8.4.18/library

    USR_LIB=/usr/lib

    export TCL_LIBRARY=$TCL_LIB:$USR_LIB

     

    # PATH

    XGRAPH=/home/NS/ns-allinone-2.33/bin:/home/NS/ns-allinone-2.33/tcl8.4.18/unix:/home/NS/ns-allinone-2.33/tk8.4.18/unix

    NS=/home/NS/ns-allinone-2.33/ns-2.33/

    NAM=/home/NS/ns-allinone-2.33/nam-1.13/

    PATH=$PATH:$XGRAPH:$NS:$NAM


    save

  7. active path setting
    type: source ~/.bashrc

  8. test (download from Ns by Example).

 

原创粉丝点击