Last update March 7, 2012

How To Ubuntu

Table of contents of this page
Ubuntu - Get started with D   
Alternative 1: Installing the DMD compiler (non-free license)   
Alternative 2: Installing the GDC compiler (free license)   
Alternative 3: Installing the GDC compiler with Tango and DSSS   
Alternative 4: 1-click install for DMD   
Installing the IDE   

Ubuntu - Get started with D    

This will help get you on your feet with D. A tip: you can copy the code and paste it in the terminal with Shift + Ctrl + V

Alternative 1: Installing the DMD compiler (non-free license)    

  1. Download and unzip to /tmp
     cd /tmp
  2. Open a terminal and get root access
    sudo su -
    cd /tmp
  3. Install the linux executables to /usr/local/bin (and make them executable too)
    install -p -m 0755 dmd/bin/dmd dmd/bin/obj2asm dmd/bin/dumpobj /usr/local/bin
  4. Install the manpages to /usr/local/man (under the man1 subdirectory)
    install -p -m 0644 dmd/man/man1/dmd.1 dmd/man/man1/obj2asm.1 dmd/man/man1/dumpobj.1 /usr/local/man/man1
  5. Install the library to /usr/local/lib:
    install -p -m 0644 dmd/lib/libphobos.a /usr/local/lib
  6. You can install all the Phobos import modules to a directory like /usr/local/lib/phobos
    mkdir /usr/local/lib/phobos  (cd dmd/src/phobos; find -name '*.d' | xargs tar c) | (cd /usr/local/lib/phobos; tar xv)
  7. Create the file /etc/dmd.conf and write two lines
    gksudo gedit /etc/dmd.conf
Let it contain these two lines:
  1. You may need some additional libraries:
     sudo aptitude install build-essential gdb libstdc++5
Witold Baryluk maintains prepackaged scripts which do all nacasary updates, downloads, extracting and configuration using standard APT mechanisms. Check for instructions for Debian based systems

Alternative 2: Installing the GDC compiler (free license)    

Packages can be found at and development at

  • Download the DEB packages for GDC compiler and (optionally) GDB debugger

Alternative 3: Installing the GDC compiler with Tango and DSSS    

Ubuntu Feisty, June 2007. Install the general compiller tools:
 sudo aptitude install build-essential
Go to the following webpage and download the installer that is bundled with both GDC and DSSS: or just download it directly with wget:
Then we make the file executable
 chmod +x
Execute the script:
 sudo ./
You will be asked for an installation directory the recommended is: /usr/local

And finally we configure rebuild

 sudo nano /etc/rebuild
Make it contain these two lines:
 flags=-fversion=Posix -fversion=Tango

Now you can compile a file with:

 rebuild something.d

Alternative 4: 1-click install for DMD    

2008-03-07: dmd_2.012-030608_i386.deb (DMD 2.012)

If you run into "missing ctr1.o" on linking, you need:

 sudo apt-get install libc6-dev

Installing the IDE    

  1. Now we have installed a compiler, lets install CodeBlocks?
  2. First a library we need
 sudo apt-get install libc6-dev
  1. Go to the following webpage:
  2. Go to the newest thread and you will find a link to CB_date_rev_Ubuntu6.xx.deb download it
  3. When downloaded open the file using the file manager, and then click install
  4. Done!

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: March 7, 2012 20:36 (diff))