Install ns2.35 on Ubuntu 13.04

Source: Internet
Author: User

Step 1: update the system. Enter the following command on the terminal:

Sudo app-get update # update source list
Sudo app-get upgrade # Update installed packages
Sudo app-get dist-upgrade # update software and upgrade the system

Step 2: install several required packages

Sudo apt-get install build-essential
Sudo apt-get install tcl8.5 tcl8.5-dev tk8.5 tk8.5-dev # for tcl and tk
Sudo apt-get install libxmu-dev libxmu-headers # for nam

Step 3: Download the installation package and copy it to the directory to be installed. You must obtain the root permission to install the package.

Official Website: http://www.isi.edu/nsnam/ns/, download allinone

Tar xvfz ns-allinone-2.35.tar.gz
Cd ns-allinone-2.35
./Install # install

Step 4: Configure Environment Variables

Edit the. bashrc file in the current user directory.

Vim. bashrc

Add

# Add path for NS2.
Export PATH = "$ PATH:/home/liushun/ns-allinone-2.35/bin:/home/installation folder name/ns-allinone-2.35/tcl8.5.10/unix: /home/installation folder name/ns-allinone-2.35/tk8.5.10/unix"
Export LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH:/home/installation folder name/ns-allinone-2.35/otcl-1.14:/home/installation folder name/ns-allinone-2.35/lib"
Export TCL_LIBRARY = "$ TCL_LIBRARY:/home/installation folder name/ns-allinone-2.35/tcl8.5.10/library"


Step 5: Verify Installation

Log on to the console and enter ns. Then, the system prompts you to install NS2. enter

Sudo apt-get install NS2.

Enter ns again. "%" is displayed, indicating that the installation is successful.

Enter nam and an error is reported. The system prompts you to install nam and enter it as prompted.

Sudo apt-get install nam

If the preceding command is invalid, enter

Sudo apt-get update # update

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.