editing library environment variable --
Dear all,
I am installing different version of ns2 in my machine, in different directories under the Home folder. Now that I need to append the library path into bashrc, I am totally confused. I have little idea about it, and saw post about conflicting the environment path and system crash. My library path is like: # LD_LIBRARY_PATH OTCL_LIB=/home/shojaru/ns-allinone-2.28/otcl-1.9 NS2_LIB=/home/shojaru/ns-allinone-2.28/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # TCL_LIBRARY TCL_LIB=/home/shojaru/ns-allinone-2.28/tcl8.4.5/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/home/shojaru/ns-allinone-2.28/bin:/home/shojaru/ns-allinone-2.28/tcl8.4.5/unix:/home/shojaru/ns-allinone-2.28/tk8.4.5/unix NS=/home/shojaru/ns-allinone-2.28/ns-2.28/ NAM=/home/shojaru/ns-allinone-2.28/nam-1.11/ PATH=$PATH:$XGRAPH:$NS:$NAM Now that I will add environment variable for another ns2, should I keep the above one and add another same block by only modifying the path to new ns2? Like: # LD_LIBRARY_PATH OTCL_LIB=/home/shojaru/new/ns-allinone-2.29/otcl-1.9 NS2_LIB=/home/shojaru/new/ns-allinone-2.29/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB And keep both the two blocks in the bashrc? Or, I have to append them in the existing path? Would anyone care to elaborate a little bit on this? Please? Thank you very much for your kind attention and response :) |
I don't use NS2 but I think it depends on how you usually switch things. Try adding this to your ~/.bashrc:
Code:
set_NS2_VER() { |
Dear unSpawn,
I really cannot find the words to thank you, so much time u spent on writing the codes!!! I wanted to ask another question. I run ns programs, by going to the specific directory and type in the terminal: ns example.tcl So now,if I edit the ~/.bashrc as above, would it be the same procedure as before? Like: shojaru@ubuntu:~/ns-allinone-2.28/ns-2.28$ ns example.tcl shojaru@ubuntu:~/ns-allinone-2.29/ns-2.29$ ns example.tcl or, I would have to change the procedure ? Another question is, since I have already installed 2.29 on a different level directory, would it work if I just copy the whole directory into another location? Thank you very much once again for your kind attention. |
Quote:
Quote:
|
All times are GMT -5. The time now is 08:15 PM. |