You are here:   Home > Software Installation

Software Installation

MBDyn installation


MBDyn is distributed as source code. You can find the source code in the form of a tarball on MBDyn's website,, in the "Software Download" page, or download/clone it from the project's git repository,

The favourite installation method is by compiling it yourself. You can compile MBDyn

  • natively in Linux, or

  • in Windows, for

    • Windows 10: using Linux in the Windows Subsystem for Linux

    • most Windows versions: using specific build environments (Cygwin, MSYS/MinGW)

  • in Mac: in progress.


MBDyn compilation and installation is based on GNU’s autotools. You need:

  • (GNU’s) make,

  • a C compiler and

  • a C++ compiler;

(Until MBDyn 1.7.3 you also needed a Fortran compiler, which is now optional.)


Linux users:

Note: in command examples below, a `$' prefix means you can run the command as a regular user; a `#' prefix means you need to run the command as the superuser (i.e. as the user "root" or using the command "sudo" in front of the actual command). You need special permissions to do that.

  • required tools: make sure GNU make, gcc, g++ and gfortran are installed

    • in Ubuntu:
      # apt update
      # apt install make gcc g++ gfortran

  • recommended optional packages: optionally install libltdl, lapack, suitesparse, netcdf (>= 4 is preferred)

    • in Ubuntu:
      # apt update
      # apt install libltdl-dev liblapack-dev libsuitesparse-dev libnetcdf-dev libnetcdf-cxx-dev

    • in other distros you should be able to locate the corresponding packages.
  • get MBDyn's source code: you can use tarballs of official releases, or snapshots from the git repository

    • official release: tarball from the website:

    • a snapshot from the git repository:

      • visit the website

      • either

        • select the develop branch from the menu, download a tarball, and change directory into the source tree
          $ tar xzvf mbdyn-develop.tar.gz
          $ cd mbdyn-develop

        • copy the URL required to clone it with git, then change directory into the source tree and checkout the develop branch
          $ git clone

          $ cd mbdyn
          $ git checkout develop

      • generate the required build scripts:
        $ sh

  • from within the source tree, configure the package:
    $ ./configure

  • build it:
    $ make

  • (optionally) install it:
    # make install

Note: the software will be installed in /usr/local/mbdyn/*; to install elsewhere, configure with --prefix=/path; e.g. --prefix=/usr/local.

If you don't install the software, the main executable, "mbdyn", will be in subfolder mbdyn/. You can safely copy it wherever you want, e.g. somewhere in your path.


Note: if you plan to do some serious development, e.g. if you download the source code from the git repository, you can build it outside the source tree (recommended); in that case

  • create a build tree:
    $ cd ..
    $ mkdir mbdyn-build
    (instead of "mbdyn-build", use your preferred name)
    $ cd mbdyn-build

  • configure the package:
    $ ../mbdyn/configure
    (use the correct path to the source tree)

From this point on, build and install continues as above. You can have multiple build trees pointing to the same source tree, for example if you need to build with different configure options.


Windows 10 users

The recommended approach is to install the Windows Subsystem for Linux. You can find instructions in Windows 10 official documentation; for example, see here:

After your Windows Subsystem for Linux is installed, follow instructions here (for Ubuntu; for other distros, package names may vary):

When you get to downloading MBDyn, you can jump to the previous general instructions about building MBDyn in Linux.


All Windows users

MBDyn has been successfully built using

Those systems are relatively outdated. The user is referred to the specific instructions to set-up the system and the build environment.

At that point, building MBDyn follows the same rules as for Linux.

As an alternative, one can find unofficial (i.e. unsupported!) binaries compiled with MSYS/MinGW here: (YMMV! Replace 1.7.3 with the desired version; beware: binaries are not available for all versions).

Powered by CMSimple|