This article is outdated and may not work correctly for current operating systems or software.
In almost every programming language, there is a package manager that makes it easy to build your application along with all your dependencies. DUB, a package manager for D, makes it easy to build your application and also manage dependencies for your project. Dependencies can be found at http://code.dlang.org. This tutorial will show you how to install DUB on Ubuntu 14.04 x64.
You will need to download DUB. To do so, run:
Extract what you have downloaded and install it by running the following commands:
tar xvf dub-0.9.22-linux-x86_64.tar.gz mv dub /usr/local/bin
This will install DUB into the system making it available for use in your
Verify your installation with this command:
dub init test
You should get a message beginning with
Successfully created an empty project in and if you do, you can
cd into the
test directory and run
dub, which will build and execute the code located in
test/source/app.d. If you get a message saying
Edit source/app.d to start your project., then you have successfully installed DUB.
Note: You may want to read the official DUB documents to learn more on how you can setup your dependencies, and your project the way you wish to set it up. This will be extremely useful for multi-deployment when building on different platforms (and possibly in the future for different platforms by cross compiling).