www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Basic LDC Linux Install Question

reply jmh530 <john.michael.hall gmail.com> writes:
I'm more of a Windows user than a Linux user. I have the latest 
DMD on my Linux install (linux mint 17.3), but I wanted to test 
LDC.

I get a message that ldc2 is not found when I type ldc2 --version 
or sudo ldc2 --version (I'm not on root and the existing user 
does not have root privileges, so I have to sudo around that 
folder).

Here's what I did:
1) Download binary from ldc github page
2) Unpack and copy to /usr/local/bin/ldc/ldc2-1.4.0-linux-x86_64

I was concerned that the issue is that ldc2 is not in the path. 
When I type $PATH I get
bash: 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gam
s:/usr/local/games: No such file or directory

Do I need to add /usr/local/bin/ldc to it also? Or am I missing 
out on some other step?
Sep 19
parent reply Daniel Kozak <kozzi11 gmail.com> writes:
Yes you need to add ldc2 to your PATH. So if your ldc2 binary is in
/user/something/something/folder_where_is_ldc2/ldc2
you havto add /user/something/something/folder_where_is_ldc2 to your PATH.
You can test this by pasting this to terminal:

export PATH=$PATH:/user/something/something/folder_where_is_ldc2
ldc2 --version

On Tue, Sep 19, 2017 at 2:26 PM, jmh530 via Digitalmars-d-learn <
digitalmars-d-learn puremagic.com> wrote:

 I'm more of a Windows user than a Linux user. I have the latest DMD on my
 Linux install (linux mint 17.3), but I wanted to test LDC.

 I get a message that ldc2 is not found when I type ldc2 --version or sudo
 ldc2 --version (I'm not on root and the existing user does not have root
 privileges, so I have to sudo around that folder).

 Here's what I did:
 1) Download binary from ldc github page
 2) Unpack and copy to /usr/local/bin/ldc/ldc2-1.4.0-linux-x86_64

 I was concerned that the issue is that ldc2 is not in the path. When I
 type $PATH I get
 bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
 No such file or directory

 Do I need to add /usr/local/bin/ldc to it also? Or am I missing out on
 some other step?
Sep 19
parent jmh530 <john.michael.hall gmail.com> writes:
On Tuesday, 19 September 2017 at 12:37:12 UTC, Daniel Kozak wrote:
 Yes you need to add ldc2 to your PATH. So if your ldc2 binary 
 is in
 /user/something/something/folder_where_is_ldc2/ldc2
 you havto add /user/something/something/folder_where_is_ldc2 to 
 your PATH.
 You can test this by pasting this to terminal:

 export 
 PATH=$PATH:/user/something/something/folder_where_is_ldc2 ldc2 
 --version
Okay, not good enough to just point to the ldc folder, I need to point to the ldc/ldc-1.4.0/bin folder. That's just like Windows, now that I think of it. Thanks.
Sep 19