Installing Ns2.34 with Mannasim in Linux Mint 14

Post Version: 1.1

Version of GCC I use: 4.7.2

This is the version of GCC that comes default with Linux Mint 14.

gcc_VersionIf you wish to install ns2.34 without Mannasim skip steps 4 and 9.

1. Download ns-allinone-2.34 from this site:
2. Extract the downloaded file into your home folder(say, /home/micman)

Throughout this post, I shall be mentioning my home folder /home/micman. When you follow these procedures, replace my username micman with your username.
3. Place the file ns2.34-mannasim-gcc4.3.patch into the following folder:


4. In Terminal, type the following commands:

cd /home/micman/ns-allinone-2.34
path -p1 < ns2.34-mannasim-gcc4.3.patch

5. If the patch gets applied without any error, proceed to next step open the following file


Replace the following lines:

SHLIB_LD="ld -shared"

with the following:

SHLIB_LD="gcc -shared"

6. Next, open the following file:


In line 219, make the following changes:
Find this line:

return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

and replace it with:

 return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

7. Next, open the following file:


In line 65, make the following changes:

Include this header file

#include "cstddef" 

8. Open the following file:


Find the following code:

if (int_m == m) {
resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();
} else {
resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();
return resultPower;

Replace it with the code below:

if (int_m == m) {
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
} else {
resultPower = GammaRandomVariable(m, Pr/m).value();
return resultPower;

9. In the following file, some code needs to be commented:


Comment the following lines:

OnDemandData :: OnDemandData()
/// REAL request type is default.

10. Finally, in the following file:


Make the following changes:
In line 137, change the following line

void eraseAll() { erase(baseMap::begin(), baseMap::end()); }


void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }

11. When all the above steps have been completed successfully, run the following commands in Terminal before we begin installing ns2:

sudo apt-get install build-essential autoconf automake libxmu-dev

Once the above updates are successful, we shall proceed with installing ns2.

12. Navigate into the ns-allinone-2.34 folder:

cd /home/micman/ns-allinone-2.34

13. Just run the following command:


14. Meanwhile, while the installation is happening, create the following file in /home/micman, if it doesn’t exist(else use the existing file):


15. Copy the following contents into .bashrc file created now:




Here, micman is my username, replace it with your system username.

16. Meanwhile, in the Terminal, if the installation completes without any error, then close the terminal, and reopen it and type the following command:

if % sign appears then the installation has been successful.

Additional Links:

Download Linux Mint:

Download mannasim patch for ns2.34:

Download PowerIso:

This article is sponsored by:


Was this post helpful? Then thank me by clicking <this link>

Connecting to Belkin N150 in Ubuntu 10.10

belkin ubuntu10.10

I had bought a Belkin router few months back. The label on the router box said that it supports only Windows and Mac operating systems. I wondered why it can’t support Linux(Ubuntu) when it could sense a Mac. So I set out on a frustrating journey to find out how to make my Compaq Presario CQ50 dual booting Windows 7 and Ubuntu 10.10 to be able to detect my Belkin N150 router in Ubuntu.

First, I created a wireless connection in the Network Manager. It should be noted that the wifi button on my laptop never toggled between ON and OFF. It was always turned ON.The “Wireless Networks” option in Network Manager applet either read as “device not ready” or “wireless network disabled”. Moreover I was conveniently able to connect to wired Internet.

So I probed for the driver used by my system.

$ ethtool -i eth0 

My driver was r8169, which I downloaded from this[1] site.

I installed it as instructed in that downloaded package.

Next, I ran the following command to list all the wired and wireless connections available for my system.

$ ifconfig -a 

Surprisingly, it showed an entry “wlan0” for the wireless network, apart from “eth0” and “lo” for wired and loopback connection.

So, I thought of enabling the wireless connection using the following command:

$ sudo ifconfig wlan0 up 

But, that threw an error “SIOCSIFFLAGS: Operation not possible due to RF-kill” so I googled for solutions using that error message and I chanced upon this[2], this[3] and this[4] solutions.

Based on the instructions in those sites i did the following:

$ rfkill list 

the result was:

0: hp-wifi: Wireless LAN

Soft blocked: yes

Hard blocked:no

1: phy0: Wireless LAN

Soft blocked: no

Hard blocked: no

Now we would reach the solution if we set “Soft Blocked” to “yes” for hp-wifi.

So i did:

$ sudo rm /dev/rfkill 

then restarted laptop and then again in the terminal:

$ sudo rfkill unblock 0 


$ sudo rfkill unblock wifi 

and then finally,

$ sudo ifconfig wlan0 up 

Bingo! it worked. The wireless networks were now detected by my ubuntu 10.10