Skip to content
Discussions/App Development/Daml - command not found - bash terminalForum ↗

Daml - command not found - bash terminal

App Development11 posts1,207 views14 likesLast activity Jun 2021
DH
dhaileytahaOP
Mar 2021

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

QU
quidagis
Mar 2021

Hi @dhaileytaha welcome!

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

gist.github.com

https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7

path.md
The `PATH` is an important concept when working on the command line. It's a list
of directories that tell your operating system where to look for programs, so
that you can just write `script` instead of `/home/me/bin/script` or
`C:\Users\Me\bin\script`. But different operating systems have different ways to
add a new directory to it:

## Windows

1. The first step depends which version of Windows you're using:
  * If you're using Windows 8 or 10, press the Windows key, then search for and
This file has been truncated. show original

WP Beaches – 13 Mar 21

How to Add to the Shell Path in macOS Big Sur or Catalina using Terminal

What is the shell path in macOS Big Sur or Catalina and how to add extra location paths to it using a .zshrc config file

Est. reading time: 4 minutes

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.

DH
dhaileytaha
Mar 2021

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

ST
stefanobaghino-da
Mar 2021

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/...

DH
dhaileytaha
Mar 2021

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?

AN
anthony
Mar 2021

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:

ST
stefanobaghino-da
Mar 2021
dhaileytaha:

Thanks a lot @stefanobaghino-da

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

No problem, happens. :smiley:

dhaileytaha:

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

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.

QU
quidagis
Mar 2021
stefanobaghino-da:

your path is lacking the initial / ? It should be /Users/...

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

… my eyes need an upgrade.

NA
Navya_Teja
Jun 2021

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

QU
quidagis
Jun 2021

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.

NA
Navya_Teja
Jun 2021

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

← Back to Discussions