www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd on ubuntu installation

reply Michael P. <baseball.mjp gmail.com> writes:
Okay, I've been trying to install DMD on Ubuntu for a while, but I just can't
get it. Is there an up to date guide on installing DMD on Ubuntu?
I'm new to Linux too. :P
I've tried quite a bit of googling, and found some stuff, but quite a bit of it
won't work with the latest release, where there are separate directories for
linux, mac, and windows.
Help. :)
May 10 2009
next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Sun, 10 May 2009 17:14:12 -0400, Michael P. wrote:

 Okay, I've been trying to install DMD on Ubuntu for a while, but I just
 can't get it. Is there an up to date guide on installing DMD on Ubuntu?
 I'm new to Linux too. :P
 I've tried quite a bit of googling, and found some stuff, but quite a
 bit of it won't work with the latest release, where there are separate
 directories for linux, mac, and windows. Help. :)
I assume you have already tried the .deb or have no desire to use it and aren't going to use Tango. The simplest is to extract it and put dmd/ linux/bin in your path. $ PATH=$PATH:$HOME/dmd/linux/bin I'm going to suggest install-d.sh: http://groups.google.com/group/ dlanguage/files But I have to warn you that it doesn't have the most thorough testing, and currently only works if you install as root. To download and install version 1.043 $ sudo ./install-d -d -v 1.043 As for doing this by hand. The two directories you are interested in are src/ and linux/ the others are just manuals and other operating systems. copy the files found in linux/ to /usr/local/ copy src/phobos to /usr/local/include/ With this you'd need to edit dmd.conf to look more like this $ vim /usr/local/bin/dmd.conf [Environment] DFLAGS=-I/usr/local/include/phobos -L-L/usr/local/lib
May 10 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Jesse Phillips Wrote:
 
 As for doing this by hand. The two directories you are interested in are 
 src/ and linux/ the others are just manuals and other operating systems.
 
 copy the files found in linux/ to /usr/local/
 
 copy src/phobos to /usr/local/include/
 
 With this you'd need to edit dmd.conf to look more like this
 
 $ vim /usr/local/bin/dmd.conf
 
 [Environment]
 
 DFLAGS=-I/usr/local/include/phobos -L-L/usr/local/lib
Okay, so this is what I tried to do. But when I type dmd in the terminal, I get this: michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ Do you know why?
May 10 2009
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Michael P. wrote:
 But when I type dmd in the terminal, I get this:
 
 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 
 
 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
May 10 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Frits van Bommel Wrote:

 Michael P. wrote:
 But when I type dmd in the terminal, I get this:
 
 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 
 
 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
Okay, but what should I do to fix that? I tried: michael ubuntu:~$ chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} chmod: changing permissions of `/usr/local/bin/dmd': Operation not permitted chmod: changing permissions of `/usr/local/bin/dumpobj': Operation not permitted chmod: changing permissions of `/usr/local/bin/obj2asm': Operation not permitted chmod: changing permissions of `/usr/local/bin/rdmd': Operation not permitted michael ubuntu:~$ but that happened. :(
May 10 2009
parent reply Mike Parker <aldacron gmail.com> writes:
Michael P. wrote:
 Frits van Bommel Wrote:
 
 Michael P. wrote:
 But when I type dmd in the terminal, I get this:

 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 

 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
Okay, but what should I do to fix that? I tried: michael ubuntu:~$ chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} chmod: changing permissions of `/usr/local/bin/dmd': Operation not permitted chmod: changing permissions of `/usr/local/bin/dumpobj': Operation not permitted chmod: changing permissions of `/usr/local/bin/obj2asm': Operation not permitted chmod: changing permissions of `/usr/local/bin/rdmd': Operation not permitted michael ubuntu:~$ but that happened. :(
Try adding 'sudo' to the front of the chmod command line. You have to execute it as root.
May 10 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Mike Parker Wrote:

 Michael P. wrote:
 Frits van Bommel Wrote:
 
 Michael P. wrote:
 But when I type dmd in the terminal, I get this:

 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 

 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
Okay, but what should I do to fix that? I tried: michael ubuntu:~$ chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} chmod: changing permissions of `/usr/local/bin/dmd': Operation not permitted chmod: changing permissions of `/usr/local/bin/dumpobj': Operation not permitted chmod: changing permissions of `/usr/local/bin/obj2asm': Operation not permitted chmod: changing permissions of `/usr/local/bin/rdmd': Operation not permitted michael ubuntu:~$ but that happened. :(
Try adding 'sudo' to the front of the chmod command line. You have to execute it as root.
Okay, I still can't run dmd. I get the same thing. But it works when I do sudo dmd. michael ubuntu:~/d$ cd .. michael ubuntu:~$ sudo chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} [sudo] password for michael: michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ sudo dmd Digital Mars D Compiler v1.043 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/1.0/index.html Usage: *snip* michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ Any suggestions now?
May 10 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Michael P. Wrote:

 Mike Parker Wrote:
 
 Michael P. wrote:
 Frits van Bommel Wrote:
 
 Michael P. wrote:
 But when I type dmd in the terminal, I get this:

 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 

 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
Okay, but what should I do to fix that? I tried: michael ubuntu:~$ chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} chmod: changing permissions of `/usr/local/bin/dmd': Operation not permitted chmod: changing permissions of `/usr/local/bin/dumpobj': Operation not permitted chmod: changing permissions of `/usr/local/bin/obj2asm': Operation not permitted chmod: changing permissions of `/usr/local/bin/rdmd': Operation not permitted michael ubuntu:~$ but that happened. :(
Try adding 'sudo' to the front of the chmod command line. You have to execute it as root.
Okay, I still can't run dmd. I get the same thing. But it works when I do sudo dmd. michael ubuntu:~/d$ cd .. michael ubuntu:~$ sudo chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} [sudo] password for michael: michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ sudo dmd Digital Mars D Compiler v1.043 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/1.0/index.html Usage: *snip* michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ Any suggestions now?
BTW, I did get a .d file to compile. Had to use 'sudo dmd' and not just 'dmd'.
May 10 2009
parent reply grauzone <none example.net> writes:
Michael P. wrote:
 Michael P. Wrote:
 
 Mike Parker Wrote:

 Michael P. wrote:
 Frits van Bommel Wrote:

 Michael P. wrote:
 But when I type dmd in the terminal, I get this:

 michael ubuntu:~$ dmd
 bash: /usr/local/bin/dmd: Permission denied
 michael ubuntu:~$ 

 Do you know why?
Looks like you didn't "chmod +x" it. Zip files don't store *nix permissions...
Okay, but what should I do to fix that? I tried: michael ubuntu:~$ chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} chmod: changing permissions of `/usr/local/bin/dmd': Operation not permitted chmod: changing permissions of `/usr/local/bin/dumpobj': Operation not permitted chmod: changing permissions of `/usr/local/bin/obj2asm': Operation not permitted chmod: changing permissions of `/usr/local/bin/rdmd': Operation not permitted michael ubuntu:~$ but that happened. :(
Try adding 'sudo' to the front of the chmod command line. You have to execute it as root.
Okay, I still can't run dmd. I get the same thing. But it works when I do sudo dmd. michael ubuntu:~/d$ cd .. michael ubuntu:~$ sudo chmod u+x /usr/local/bin/{dmd,dumpobj,obj2asm,rdmd} [sudo] password for michael: michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ sudo dmd Digital Mars D Compiler v1.043 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/1.0/index.html Usage: *snip* michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ Any suggestions now?
BTW, I did get a .d file to compile. Had to use 'sudo dmd' and not just 'dmd'.
The files are probably not readable (r) or executable (x) by all other users (o). Try "chmod o+rx /usr/local/bin/dmd".
May 10 2009
parent reply Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Sun, May 10, 2009 at 10:17 PM, grauzone <none example.net> wrote:

 The files are probably not readable (r) or executable (x) by all other users
 (o). Try "chmod o+rx /usr/local/bin/dmd".
Of course, prepend 'sudo' :|
May 10 2009
parent Michael P. <baseball.mjp gmail.com> writes:
Jarrett Billingsley Wrote:

 On Sun, May 10, 2009 at 10:17 PM, grauzone <none example.net> wrote:
 
 The files are probably not readable (r) or executable (x) by all other users
 (o). Try "chmod o+rx /usr/local/bin/dmd".
Of course, prepend 'sudo' :|
That worked. Thanks for everyone's help. :)
May 11 2009
prev sibling parent Jesse Phillips <jessekphillips gmail.com> writes:
On Sun, 10 May 2009 20:23:52 -0400, Michael P. wrote:

 Jesse Phillips Wrote:
 
 As for doing this by hand. The two directories you are interested in
 are src/ and linux/ the others are just manuals and other operating
 systems.
 
 copy the files found in linux/ to /usr/local/
 
 copy src/phobos to /usr/local/include/
 
 With this you'd need to edit dmd.conf to look more like this
 
 $ vim /usr/local/bin/dmd.conf
 
 [Environment]
 
 DFLAGS=-I/usr/local/include/phobos -L-L/usr/local/lib
Okay, so this is what I tried to do. But when I type dmd in the terminal, I get this: michael ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied michael ubuntu:~$ Do you know why?
Thank you for letting me know, hopefully the script has been fixed. FYI, you can install version 2 side-by-side and use dmd-switch.sh to change which will be executed. You should be able to do the same with Tango and Phobos if you use install-tango.sh
May 11 2009
prev sibling parent Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 Okay, I've been trying to install DMD on Ubuntu for a while, but I just
 can't get it. Is there an up to date guide on installing DMD on Ubuntu?
Hi, If you give up installing DMD you could try ldc http://www.dsource.org/projects/ldc which has ready ubuntu packages (x86, x86_64/amd64, lpia) and daily builds, http://www.dsource.org/projects/ldc#Ubuntuldcandldcdailypackages
May 10 2009