Complete NS2.33 installation process and related issues in Ubuntu12.10

Source: Internet
Author: User
Preparation: ubuntu12.10has been successfully installed with the dig download ns2installation file, I am here ns-allinone-2.33.tar, and prepare two additional patches: tk-8.4-lastevent.patch and tk-8.4.18-tkBind.patchtk-8.4-lastevent.patch: free in tk-8.4.18-tkBind.patch

Preparation: Ubuntu 12.10has successfully installed the installation package to download the ns2installation file. Here I am using ns-allinone-2.33.tar, and prepare two other patches:Tk-8.4-lastevent.patchAndTk-8.4.18-tkBind.patch

Tk-8.4-lastevent.patch and tk-8.4.18-tkBind.patch:

Free in http://linux.linuxidc.com/

The username and password are both www.linuxidc.com

The download directory contains the complete installation process and related questions in Ubuntu12.10 of/Sept./Sept./NS2.33/Sept. 9/Sept.

Or

Baidu cloud disk download: http://pan.baidu.com/share/link? Consumer id = 552203 & uk = 487907638

Install NS2.35 http://www.linuxidc.com/Linux/2012-03/55990.htm in Ubuntu 11.10

Step 1:Copy the ns2compressed package ns-allinone-2.33.tar.gz to the desktop, right-click and decompress it to the desktop, and copy the decompressed folder to the ready installation location,

For example, in my folder home/wl (wl is the login user name), create a new folder program and paste the folder of NS2.

Step 2:In the root user name or admin user, download and install the system package required for the ns-2.33 installation, the details are as follows:

First, enter apt-get install build-essential in the terminal to download and install it. This step is for gcc and some essential installation;

Then, enter apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev in the terminal to download and install tcl and tk;

Finally, enter apt-get install libxmu-dev in the terminal to download and install it. This step is for the installation of nam.

Step 3: Check the gcc version. The version automatically installed by the system is generally higher than 4.0, but it is still necessary to check before installation. The terminal command is as follows:

Run ls/usr/bin/gcc-l or gcc -- rsion or gcc-v on the terminal. Mine is gcc4.7.2.

Because gcc 4.0 used ld-share to generate a shared library, but later than version 4.0, this command was changed to gcc-share.

Therefore, if the version is higher than gcc4.0, you need to make the following changes:

Cd/home/liu/Program/ns-allinone-2.33 // otcl-1.13
Do gedit configure. in

Save the 77 rows and change SHLIB_LD = "ld-shared" to SHLIB_LD = "gcc-shared", and exit

Modify the configure 5,518th line SHLIB_LD = "ld-shared" to SHLIB_LD = "gcc-shared" and save and exit.

The above modification is in the form of terminal commands and can be opened directly in the view, provided that the "read and write" permission of the file is opened.

Step 4:Because I installed ns2.33, it is said that there are some problems, so I tested and installed the patch in advance. The specific steps are as follows:

 

(1) run the built-in instance for testing:/ns-allinone-2.33/ns-2.33/tcl/ex/simple. tcl
Possible problems:
The system prompts the following,
[Code omitted because of length]

: No event type or button # or keysym
While executing
"Bind Listbox {
% W yview scroll [expr {-(% D/120) * 4}] units
}"
Invoked from
"If {[tk windowingsystem] eq" classic "| [tk windowingsystem] eq" aqua "}{
Bind Listbox {
% W yview scroll [expr {-(% D)}] units
}
Bind Li ..."

Cause: It is said that ns2.33, which is caused by the incompatibility of the tk component called by nam and the xproto-7.0.13 (the xproto-7.0.13 has added GenericEvent), So patch the ns2.33 before installing it. If no patch is installed, an error will be reported when nam is called later.

Solution:

(1) prepared patch tk-8.4-lastevent.patch

Move this file to tk8.4.18 In the ns directory.

$ Cd/home/liu/Program/ns-allinone-2.33/tk8.4.18

$ Patch-p1

(2) Prepare the patch tk-8.4.18-tkBind.patch
Move the file tk-8.4.18-tkBind.patch to the ns-allinone-2.33 directory and run the following command:
$ Patch-p0

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.