Daml - command not found - bash terminal

Hi,
I am getting DAML - command not found error, even after setting the path variable

image 1:

Image 2: JAVA_HOME variable

Image 3: PATH

Please help.

Also, i am not able to join slack channel. Can you please add my email : tahadhailey@kpmg.com.my and dhaileytaha@gmail.com

Thanks

Hi @dhaileytaha welcome!

MACOSX is similar to GNU/Linux but not exactly the same:

So you add the required directory/ to $PATH, then you have to source it.

$ source ./bash_profile

Or

$ . ./bash_profile

Or exit all terminal sessions.

Or log out of the Desktop, log back in again.

Let us know how it goes.

1 Like

Hi,
Thanks for the answer. I have shared the image of my path as image3.
And did source .bash_profile

Still no luck… :frowning:

Please help

I’m not 100% sure because the red highlight partly hides it, but could it be that the Daml directory in your path is lacking the initial /? It should be /Users/...

2 Likes

Thanks a lot @stefanobaghino-da

Yes, the “/” was missing lol
Apologies for the silly mistake.

Another thing, is there any way i can join slack?

The slack is mostly inactive as we encourage users to use the forum but you can visit slack.daml.com if you really want to join it :slight_smile:

1 Like

No problem, happens. :smiley:

I’m not even sure whether we’re using it anymore to be honest. The forum works way better to make sure people can find answers to known problems and we’re also very active here.

2 Likes

Well done. Only after maximising the image and squinting, could I see that :+1:t2:

… my eyes need an upgrade.

1 Like

HI @dhaileytaha ,
No idea about setting path in macos to get daml to work,
i have got this problem in ubuntu after installing java sdk,so just paste this in terminal and enter these three commands.It worked for me.

echo $0

echo “export PATH=$HOME/.daml/bin:$PATH” >> ~/.bash_profile

source ~/.bash_profile

3 Likes

Hi @Navya_Teja welcome to the Daml Forum, good to ‘see’ you :wave:t2:

Using both Ubuntu & Debian, I tried the default method of setting the Daml $PATH to be sourced from ~/.bash_profile, but it did not work. I used ~/.bashrc instead.

$ cd
$ nano ~/.bashrc
---
At bottom of the .bashrc file

export PATH="/home/quid/.daml/bin:$PATH"
---
$ source ~/.bashrc

Log out of the desktop session, log back in again and test:

$ cd
$ echo $PATH
/home/quid/.poetry/bin:/home/quid/.daml/bin:/home/quid/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$ daml version
SDK versions:
  1.12.0
  1.13.1  (default SDK version for new projects)

Many people on #stackoverflow will say to use ~/.bash_profile on Ubuntu/Debian but in my experience, it is non-consistent YMMV.

2 Likes

Got it now @quidagis
official docs has suggested ~/.bash_profile.
bashrc worked. ThankYou.

2 Likes