Error while installing ns3-dev ( 3.36.1)

255 views
Skip to first unread message

Divyasheel

unread,
Dec 30, 2022, 2:47:31 AM12/30/22
to ns-3-users
Greetings everyone,

I start by configuring as:
./ns3 configure --enable-examples --enable-tests -d optimized

and then :
./ns3 install 

but this installation stops with an error message -
➤ ./ns3 install
[0/2] Re-checking globbed directories...
[1858/1859] Install the project...
-- Install configuration: "release"
CMake Error at cmake_install.cmake:46 (file):
  file cannot create directory: /usr/local/lib/pkgconfig.  Maybe need
  administrative privileges.


FAILED: CMakeFiles/install.util
cd /mnt/Store/Project-summer/ns-3-dev/cmake-cache && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 15 --target install ; cd ..

Can someone help me with this, I have tried almost all the online resources but there seems to be no clear documentation on how to build ns3-dev.


Gabriel Ferreira

unread,
Dec 30, 2022, 10:42:43 AM12/30/22
to ns-3-users
The 3 commands you're most likely to use are 

ns3 configure
ns3 build
ns3 run

They're all mentioned in the tutorial. 

These are the exact same commands as you would find 
in any IDE, which are also shown below in the tutorial. 

`ns3 install` in only used in very specific scenarios.
The only reason it exists is to test for 
packaging and redistribution. 

And it is failing to install because /usr/local is protected. 
You would need to run with sudo to install it there.
Since the installation didn't proceed, I guess everything is working as expected. 
Reply all
Reply to author
Forward
0 new messages