How to install D on Linux as non-root?
Brad Roberts
braddr at puremagic.com
Sat Jan 20 16:05:27 PST 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Hello,
>
>
> The D installation instructions for Linux assume root privileges. I
> didn't manage to install it as non-root, and I need to. Could anyone
> here provide instructions? Then hopefully Walter will paste them onto
> the installation page.
>
>
> Thanks.
>
> Andrei
1) unzip the dmd.zip file somewhere, for example:
a) cd ~
b) unzip dmd.zip (assumes dmd.zip is in current dir)
2) chmod u+x ~/dmd/bin/{dmd,dumpobj,obj2asm,rdmd}
3) edit ~/dmd/bin/dmd.conf
DFLAGS=-I%@P%/../src/phobos -L-L%@P%/../../dmd/lib
Personally, I don't like putting things like this in my home dir like
that, but for the sake of keeping it simple that's what I've done here.
If you prefer to put it elsewhere, then alter the paths above to suit.
Maybe a better installation procedure would be
1) installpath=~/d (path to put the binaries)
2) sourcepath=/tmp (path that has dmd.zip)
3) cd $installpath
4) unzip $sourcepath/dmd.zip
5) chmod u+x $installpath/dmd/bin/{dmd,dumpobj,obj2asm,rdmd}
6) edit $installpath/dmd/bin/dmd.conf
DFLAGS=-I%@P%/../src/phobos -L-L%@P%/../../dmd/lib
Walter,
If you changed the default dmd.conf file to look like that, then no
one would have to edit it at all. If you switched to something other
than .zip that supports permission bits, such as a tarball, then step 2
could be eliminated.
Later,
Brad
More information about the Digitalmars-d
mailing list