Install DUB on Ubuntu 14.04

  • Last Created On Dec 09, 2024
  • 7
0 0

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.

Requirements

  • AKLWEB HOST VPS with Ubuntu 14.04 x64.
  • Basic knowledge of D.
  • Have DMD, LDC, or GDC installed (DMD is recommended).

Download DUB

You will need to download DUB. To do so, run:

wget http://code.dlang.org/files/dub-0.9.22-linux-x86_64.tar.gz

Extract and Install DUB

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 PATH variable.

Verify Installation

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).

Views: 7

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2634
  • Our Privacy Policy
    2479
  • Our Cookies Policy
    275
  • Our Terms of Use
    153
  • How to Install JAX with ROCm Acceleratio...
    96