Regarding the NS2,
I knew it was disgusting to install the software before, because it was software 10 years ago, but I didn't expect it to be really disgusting... it took me a whole day to install it.
The version I installed is ns-allinone-2.28 and the system version is ubuntu14.04
In fact, most of the problems can be solved in other blogs, but some of them cannot.
The following lists the problems I encountered and solved by myself. I didn't have them before. I 'd like to write them down.
Loss of precision from 1.int * to int
I checked some information and found that the original version is 32-bit, while my ubuntu is 64-bit, so there will be a problem of loss of precision (64-bit int and 32-bit length is not the same)
Solution: Open the problematic file and modify the specific line (the problem will be explained, if the specific number of lines is not given, it will actually pop up, the original int type is changed to the unsigned long int type.
This can all be modified.
2. const char * cannot be converted to char *
This problem can be easily solved. Find the specific line of the specific file and convert the type to char *.
3. fix_x86_64-unknown-linux-gnu.sh
The third problem was encountered at the beginning. I can't remember it clearly. I probably cannot identify 64-bit files. In short, I can run a patch script. I can find this script online.
Other problems can be directly modified based on the error message, such as deleting some prefixes and so on. Some Variables cannot be found online, there are related methods to define variables.
I encountered these problems yesterday, but I still have some minor problems. In short, the installation is complete after countless times.
But it's not that simple. Today, when I want to test a demo, I find that nam is not usable !!! At that time, my heart collapsed.
I searched in the nsfolder and found that there was no file named "nam.exe". I haven't found this problem for a long time on the Internet. At that time, I felt really annoyed. Then I got lucky and searched it in the whole system,
I found that nam.exe exists, but ran to usr/bin, So I copied and pasted it to the bin of ns, So I thought this was finally done.
But when I was running nam, your sister reported an error.
$ Nam
The following error message is displayed:
[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
"If {[tk windowingsystem] eq" classic "| [tk windowingsystem] eq" aqua "}{
Bind Listbox <MouseWheel> {
% W yview scroll [expr {-(% D)}] units
}
Bind Li ..."
Baidu found that this is caused by nam calling the tk component and the xproto-7.0.13 is not compatible (the xproto-7.0.13 added a new GenericEvent ). The solution is as follows:
Add 3 lines of code after line 588th of tk-8.4.11/generic/tkBind. c
After being added, the effect is:
/* MappingNotify/0,
# Ifdef GenericEvent
/* GenericEvent */0,
# Endif
/* VirtualEvent */VIRTUAL,
After the change, you need to repeat the ns folder directory./intsall
Opening the nam is allowed (the first time I saw the nam, I was very excited)
However, the nam.exe in usr/bincannot be opened! It turns out that this stuff in usr has never been changed before!
In this case, copy the executable nam.exe file to usr. There is a small problem. In usr, the file is not copied by default. This command is required: sudo nautilus.
The effect is that you can open a folder with the highest permissions, and then copy and paste the folder. Finally, run simple. tcl and the nam animation is displayed!
Now, I installed the NS2. :) This is also the first step on the road to learning NS2. it doesn't matter if no one looks at it, so I am used to it ~