关于编译ns3的myfirst.cc问题

@关于编译ns3的first.cc问题

小白入坑ns3

我的问题

Waf: Entering directory `/home/wyx/NS3/ns-allinone-3.25/ns-3.25/build’
[1953/2300] Compiling scratch/scratch-simulator-subdir.cc
In file included from …/scratch/scratch-simulator-subdir.cc:17:0:
./ns3/core-module.h:10:19: fatal error: ./ns3/abort.h: 权限不够
#include “abort.h”
^
compilation terminated.

Waf: Leaving directory `/home/wyx/NS3/ns-allinone-3.25/ns-3.25/build’
Traceback (most recent call last):
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py”, line 110, in waf_entry_point
run_commands()
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py”, line 171, in run_commands
ctx=run_command(cmd_name)
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py”, line 162, in run_command
ctx.execute()
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py”, line 383, in execute
return execute_method(self)
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Build.py”, line 107, in execute
self.execute_build()
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Build.py”, line 114, in execute_build
self.compile()
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Build.py”, line 183, in compile
self.store()
File “waf-tools/relocation.py”, line 24, in store
old1(self)
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Build.py”, line 162, in store
Utils.writef(db+’.tmp’,x,m=‘wb’)
File “/home/wyx/NS3/ns-allinone-3.25/ns-3.25/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Utils.py”, line 107, in writef
f=open(fname,m)
IOError: [Errno 13] Permission denied: ‘/home/wyx/NS3/ns-allinone-3.25/ns-3.25/build/.wafpickle-linux2-34014960-98.tmp’

我一直以为是权限问题,搜也搜不到相同的

后来试试在./waf前加上了sudo,输了密码后就编译成功了!!

给大家参考~

插入代码:Waf: Entering directory /home/wyx/NS3/ns-allinone-3.25/ns-3.25/build' [ 908/2300] Compiling scratch/scratch-simulator-subdir.cc [1962/2300] Compiling scratch/scratch-simulator.cc [1963/2300] Compiling scratch/myfirst.cc [2260/2300] Linking build/scratch/scratch-simulator-subdir [2268/2300] Linking build/scratch/myfirst [2280/2300] Linking build/scratch/scratch-simulator Waf: Leaving directory/home/wyx/NS3/ns-allinone-3.25/ns-3.25/build’
Build commands will be stored in build/compile_commands.json
‘build’ finished successfully (1m3.424s)
At time 2s client sent 1024 bytes to 10.1.1.2 port 9
At time 2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.00737s client received 1024 bytes from 10.1.1.2 port 9

你可能感兴趣的:(关于编译ns3的myfirst.cc问题)