Bundled with the compiler
DUB is being distributed alongside with the major D compilers whenever installing their full packages.
Once you have a D compiler installed, open the terminal and try running
dub --version to see if DUB is installed.
DUB can be installed separately from the compiler, for example this may be necessary when a package manager is used to install just the compiler or when DUB needs to be updated separately from the compiler to make use of new features.
Pre-compiled DUB binaries are available for x86 (32 and 64 bit) machines for Linux, OSX and Windows on the GitHub DUB releases. Extract the archive anywhere on your system and make sure the DUB executable is in your path.
First clone the dub repository from git:
If you already have another (perhaps older) DUB version installed, you can simply run
then, the dub executable will be inside the
If you do not have a previous dub version to bootstrap from, use the
build.d script in the repository's folder to build dub:
or directly with dmd or ldc:
These links are not maintained by the same people maintaining the official downloads.
Using the APT repository also used for the D compilers, you can simply run
Created: August 5, 2022