./waf: No such file or directory

8,894 views
Skip to first unread message

Bilal Ahmed

unread,
Mar 14, 2013, 10:49:15 PM3/14/13
to ns-3-...@googlegroups.com
Hi,

my ./waf command works fine as long as I run it from /ns-3-dev directory, e.g. john@ubuntu:~ns-3-allinone/ns-3-dev$./waf --run scratch/hello-simulator

but it doesn't work if suppose I run it from another directory. It gives me below message:

john@ubuntu:~ns-3-allinone/ns-3-dev/examples/tutorial/$./waf --run hello-simulator

bash: ./waf: No such file or directory.

Please let me know do I have to change bash file or environmental variables etc.
Thanks in Advane
-Ahmed

Alessandro Russo

unread,
Mar 15, 2013, 3:44:00 AM3/15/13
to ns-3-...@googlegroups.com
Hi,

to run a program you have to run waf from the ns-3 dir not its subdirs.
e.g.,
john@ubuntu:~ns-3-allinone/ns-3-dev/$ ./waf --run hello-simulator

 Alessandro  R.


-Ahmed

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bilal Ahmed

unread,
Mar 15, 2013, 4:06:04 AM3/15/13
to ns-3-...@googlegroups.com
Thank you.

I thought it is the problem only with me. As in ns2 when an ns command  is run, the symbol % appears regardless of the location.

El Abdellaouy Hanane

unread,
Nov 6, 2013, 9:37:14 AM11/6/13
to ns-3-...@googlegroups.com

Hi all,

I'm starting with NS3, I have the same problem with ./waf even when it's run from ns-3 directory ?
Did I miss something while downloading ns3 ? Let me please know what i'm supposed to do to fix it
Thank You

Hanane

pdbarnes

unread,
Nov 6, 2013, 1:54:21 PM11/6/13
to ns-3-...@googlegroups.com
Hello Hanane,

To get started, see the Tutorial section Downloading ns-3.  If you download and build it correctly the first time, you should have a file waf in the top level ns-3 directory, which (confusingly) isn't necessarily the top directory installed.  The $ ./build.py command creates the real ns-3 directory inside the ns-3-allinone directory:

$ pwd
ns-3-allinone

$ ls
README         constants.py   dist.py*       ns-3-dev/      util.pyc
build.py*      constants.pyc  download.py*   util.py

$ cd ns-3-dev

$ ls
AUTHORS        VERSION        scratch/       utils.py       wutils.py
CHANGES.html   bindings/      src/           utils.pyc      wutils.pyc
LICENSE        build/         test.py*       waf*
Makefile       doc/           testpy-output/ waf-tools/
README         examples/      testpy.supp    waf.bat*
RELEASE_NOTES  ns3/           utils/         script

You need to start in this directory, which has the waf command script.

Peter

ES SALHI Afaf

unread,
Feb 11, 2016, 10:03:22 AM2/11/16
to ns-3-users
Hi all,

Im discovering NS3 in order to implement somes simulations. So IM a new user.
I have the same problem and after reading you conversation, i found that i don't have ​
ns-3-dev/ into ns-allinone-3-19 directory!

Could you help me to fix this it pleas?

Thank you!

Afaf

Konstantinos

unread,
Feb 11, 2016, 10:14:44 AM2/11/16
to ns-3-users
Dear Afaf,

Please study the documentation that Peter has posted. https://www.nsnam.org/docs/tutorial/html/getting-started.html#downloading-ns-3
Do not use ns-3.19 release. It's too old now. Use the latest stable (3.24.1) 

Regards,
K.

Gunjan Gosain

unread,
Nov 10, 2017, 11:12:47 AM11/10/17
to ns-3-users
Hi All,

I am trying to run first example in NS3. I copied it from tutorial folder to scratch folder and when I'm trying to run it gave me error that no file or directory found:
Plz see the logs below:

gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev$ cd scratch/
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ls
first.cc  scratch-simulator.cc  second.cc  subdir
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ./waf --run scratch/first

bash: ./waf: No such file or directory
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ pwd
/home/gunjan/NS3repo/ns-3-allinone/ns-3-dev/scratch
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ls
first.cc  scratch-simulator.cc  second.cc  subdir
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ./waf --run scratch/scratch-simulatorbash: ./waf: No such file or directory
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ./waf --run scratch/first.cc

bash: ./waf: No such file or directory
gunjan@gunjan-HP-ENVY-Notebook:~/NS3repo/ns-3-allinone/ns-3-dev/scratch$ ./waf --run scratch/second

bash: ./waf: No such file or directory
 
Plz suggest what possibly is going wrong.

Gunjan Gosain

unread,
Nov 10, 2017, 11:13:57 AM11/10/17
to ns-3-users
Hi  Alessandro  R,

I seek some help regarding my query above about NS3.

pdbarnes

unread,
Nov 10, 2017, 5:02:51 PM11/10/17
to ns-3-users
As replied to your duplicate post in another thread, waf only exists in the top level directory. You should not cd to scratch.

Peter

Gunjan Gosain

unread,
Nov 22, 2017, 11:01:27 AM11/22/17
to ns-3-users
If I shouldn't copy file to scratch then how shall waf get to know about my file (I mean how waf get to know where my file is?)
Files are stored in /NS3repo/ns-3-allinone/ns-3-dev/src/lte/exampleslena-simple-epc.cc
and m doing command ./waf --run /NS3repo/ns-3-allinone/ns-3-dev/src/lte/exampleslena-simple-epc.cc..

what possibly m I doing wrong

pdbarnes

unread,
Nov 22, 2017, 7:12:08 PM11/22/17
to ns-3-users
Please reread the tutorial which discusses how to run examples. (waf knows all the main programs in the build, so you usually don’t have to give the full path)

Peter

Gunjan Gosain

unread,
Apr 18, 2018, 6:19:35 AM4/18/18
to ns-3-users
hi All,

I have been trying to first.cc file (after long time) but as soon as I run nothing happens. I tried to build waf again but as soon as I give command to build nothing happens. Following is the command print.

/NS3repo/ns-3-allinone/ns-3-dev$ ./waf build
Waf: Entering directory `/home/.........../NS3repo/ns-3-allinone/ns-3-dev/build'

Not sure what is going wrong.. Can anybody suggest something?



On Friday, 15 March 2013 03:49:15 UTC+1, Engr_ahmed wrote:

pdbarnes

unread,
Apr 18, 2018, 9:42:51 AM4/18/18
to ns-3-users
Try these until it works.

1. waf configure, then waf build
2. waf clean, then step 1
3. rm -rf build, then step 1

Peter

ENGR. MUHAMMAD IMRAN SALEEM

unread,
Apr 18, 2018, 11:05:56 AM4/18/18
to ns-3-...@googlegroups.com
WAF IS A COMMAND TO RUN A BUILD PROGRAM 


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.



--
_______________________________
ENGR. MUHAMMAD IMRAN SALEEM 
Assistant Professor
Computer Engineering Department
Sir Syed University of Engineering and Technology.
University Road, Karachi 75300, Pakistan.
UAN: 111-994-994
Tel:     3498-8000 , 3498-8001  ,  Ext: 308
PEC (Life Member), 
Aligarh Muslim University Old Boys Association-AMUOBA (Life Member)

kimo kama

unread,
Apr 15, 2020, 2:52:33 PM4/15/20
to ns-3-users
Hi everyone,
Actually, I'm here to thank Mr.pdbarnes for his great answer. I was googling for it since 3 days but no one gave me the clear and correct answer like your answer.
It was very helpful, and I fixed my issue through it.
Thanks you and hopefully this message is shown to you.
We might chat again.
Best regards

Sheikh Sam

unread,
Jun 23, 2020, 10:24:32 AM6/23/20
to ns-3-users
Thank you

Sheikh Sam

unread,
Jun 23, 2020, 7:32:36 PM6/23/20
to ns-3-users
Hi
have you been using the ns3 ?
saleh


On Wednesday, April 18, 2018 at 4:05:56 PM UTC+1, ENGR. MUHAMMAD IMRAN SALEEM wrote:
WAF IS A COMMAND TO RUN A BUILD PROGRAM 
On Wed, Apr 18, 2018 at 6:42 PM, pdbarnes <pd...@mac.com> wrote:
Try these until it works.

1.  waf configure, then waf build
2.  waf clean, then step 1
3.  rm -rf build, then step 1

Peter

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

parisa fm

unread,
Nov 8, 2022, 1:30:03 PM11/8/22
to ns-3-users
hello
when I use ./ns3 configure
It's said bash: ./ns3: No such file or directory
I'm trying to install Lena https://cttc-lena.gitlab.io/nr/html/getting-started.html
can anyone help me? thanks
Reply all
Reply to author
Forward
0 new messages