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

來源:互聯網
上載者:User
  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 apt-get install libxmu-dev

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

        sudo apt-get 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).

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.