# Bash: ./gem: No such file or directory

**URL:** <https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557>\
**Category:** Garfield++\
**Created:** [July 6, 2023, 5:00am UTC](https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557 "2023-07-06T05:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [July 6, 2023, 5:00am UTC](https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557/1 "2023-07-06T05:00:00Z")

</div>

![image](https://root-forum.cern.ch/uploads/default/original/3X/1/6/16c4b64d85b187530fc1780e6ab4f746ff1337d6.png)  
after these code

```auto
cp -r $GARFIELD_HOME/Examples/Gem .
mkdir build
cd build
cmake ..
make

```

comes the error ,when I try to run the application ./gem  
So what’s the problem and how to solve it

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [July 6, 2023, 5:32am UTC](https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557/2 "2023-07-06T05:32:57Z")

</div>

I think when you use `cmake ..` you actually call the `CMakeLists.txt` at the path `~/garfieldpp/` which is not the one of gem example.  
try:

```auto
cd $GARFIELD_HOME/Examples/Gem
mkdir build
cd build
cmake ..
make

```

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [July 6, 2023, 8:51am UTC](https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557/3 "2023-07-06T08:51:09Z")

</div>

Hi,  
Thanks a lot for your reply  
Indeed it’s the reason for the problem, I have tried it again, and that works.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 20, 2023, 8:51am UTC](https://root-forum.cern.ch/t/bash-gem-no-such-file-or-directory/55557/4 "2023-07-20T08:51:53Z")

</div>

Closed on July 20, 2023, 8:51am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
