How to install D on Linux as non-root?
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Fri Feb 23 18:52:27 PST 2007
Brad Roberts wrote:
> 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
A belated note of thanks :o). I only got around to doing this now (I
passed my generals exam yesterday, yay!).
One thing that ought to be added - the path "wherever/dmd/bin" should be
added to the PATH variable.
We should add a Unix installation script to the website. How about also
a little GUI? This "Kommander Editor" looks like could do the trick.
Andrei
More information about the Digitalmars-d
mailing list