Installing Dymola on Ubuntu for Linux novices

This post looks at installing Dymola on Ubuntu for users that are not experienced with Linux. The installation process is described in the documentation however this can be daunting for Linux novices so a step by step process is provided.


There are some things that this post assumes the user has:

  • The Ubuntu operating system installed on a machine or Virtual machine
  • The Dymola Linux installation files, these can be obtained from your Dymola distributor

Note that the Dymola License Server will not run on a Virtual machine, a node locked license will be required.

Installing Dymola

This post looks at installing Dymola 2021x, so commands will be tailored for this. If installing a different Dymola version change the commands appropriately.

Expanding the installation file

So after downloading the installation file you should have a file similar to the file in Figure 1 in the Downloads directory.
Figure 1. Installation file

Right click on this and select Extract Here. The installation instructions can be found at: ~/Downloads/Dymola_2021x_HF1.AM_CAT_Dymola.Linux64.1-1/AM_CAT_Dymola.Linux64/1/Installation.pdf

This can be used for further installation details.

Installing RPM packages in Ubuntu

The installation files are RPM packages; however, Ubuntu cannot install RPM packages so these packages have to be converted to deb files. To do this conversion, the alien command is used. The article how-to-install-rpm-packages-on-ubuntu describes this situation well; use these instructions to install the alien package (i.e. until Step 3. in the article).

The RPM packages to be installed are in ~/Downloads/Dymola_2021x_HF1.AM_CAT_Dymola.Linux64.1-1/AM_CAT_Dymola.Linux64/1/linux_x86_64.

  1. Open a Terminal by pressing Ctrl+Alt+T.
  2. Change directory to ~/Downloads/Dymola_2021x_HF1.AM_CAT_Dymola.Linux64.1-1/AM_CAT_Dymola.Linux64/1/linux_x86_64
  3. Run the alien command to convert the RPM packages to deb packages.

Below are the instructions used to convert the base Dymola package to a deb package.

$ cd ~/Downloads/Dymola_2021x_HF1.AM_CAT_Dymola.Linux64.1-1/AM_CAT_Dymola.Linux64/1/linux_x86_64
$ sudo alien –scripts -k dymola-2021.2-1.x86_64.rpm

(Note that it is double hyphen scripts and not -scripts as above, it is tricky to do double hyphen in WordPress).

The alien command call should be repeated for every Dymola library that you want installed from the …/linux_x86_64 directory. This process to convert a file from RPM to deb can take a long time. If an error occurs during this process see Note 3 at the end of this post.

To install the deb package use the dpkg command as below.

$ sudo dpkg -i dymola_2021.2-1_amd64.deb

Getting Dymola to run

Dymola is installed in /opt/dymola-2021x-x86_64.

To run Dymola the batch file /usr/local/bin/dymola-2021x-x86_64 must be run.

This batch script sets environmental variables so that the files in the lib64 and lib directories can be located by the Dymola executable.

When things don’t work

Typically when things don’t work it is because Dymola is trying to use a file that is not being found.

“libevent no such file” error

A common error to be returned when the dymola-2021x-x86_64 script is run is that the libevent file is not found as in Figure 2.

Figure 2. libevent file not found
Figure 2. libevent file not found

Dymola uses and it is not installed. The developers have created a fixpack to get around this issue, Dymola2020xFixPack200108. Request this fixpack from your Dymola distributors. Download the fixpack into the Downloads directory, expand it out and copy the files to the lib64 director as below.

$ sudo cp -r ~/Downloads/Dymola2020xFixPack200108/bin/lib64 /opt/dymola-2021x-x86_64/bin/

Run the Dymola starting script to check that the libevent error has been resolved.

Other “no such file found” errors

It is possible that other files that are required by Dymola are not found. In most cases the solution is to search google for install <file> and a description the package needs to be installed is returned. I have an example where this error was generated:
error while loading shared libraries: cannot open shared object file: No such file or directory

After googling install and searching around I found that libsnappy-dev contained these files so these were installed with:

$ sudo apt-get install libsnappy-dev

“no Qt platform plugin could be initialized” error

Another error that can occur when starting Dymola is in Figure 3.

Figure 3. Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Figure 3. no QT platform plugin could be initialised

The issue is related to the graphical interface, to debug this check the dependencies of This can be done by modifying the Dymola script. To do this open /usr/local/bin/dymola-2021x-x86_64 modify the last line to be:
exec ldd /opt/dymola-2021x-x86_64/bin64/platforms/ > dependencies.txt
and save it to ~/Documents as libqxcbDependencies.

The new script should look like Figure 4.

Figure 4. exec ldd /opt/dymola-2021x-x86_64/bin64/platforms/ > dependencies.txt
Figure 4. Script to determine dependencies of libqxcb[1]

Run this script by using the bash command from Terminal, that is:

$ bash ~/Documents/libqxcbDependencies

This will create dependencies.txt which can be viewed using the Text Editor. Search for “not found” as in Figure 5.

Figure 5. not found example
Figure 5. Not found dependencies of

All the dependencies that are not found in Figure 5 should be installed.

To get around this, typically one can just google for the packages not being found and install these. Files that are often not found are: – run: sudo apt-get install libxcb-xinput
libxcb-xinerama0 – run: sudo apt-get install libxcb-xinerama0

Create an application file

Unfortunately when Dymola is installed, Dymola is not present in Show Applications, so the entry to Show Applications can be manually added.

Open Files and navigate to /usr/share/applications and open any .desktop file with the Text Editor. Modify the code to be:

[Desktop Entry]
Comment=Dymola, Modeling and Simulation environment

Use Save As to save the file as dymola.desktop to ~/Documents. Copy the file using:

$ sudo cp ~/Documents/dymola.desktop /usr/share/applications/dymola.desktop

Now Dymola should be present when Show applications is opened and Dymola can be started from here. To pin Dymola to the toolbar, open Dymola and right click on the icon in the toolbar and select “Add to Favourites”.


This post will assist with installing Dymola on Ubuntu, especially for Linux novices. If other errors occur during installation please contact your Dymola distributor.

Text of Figure 4

export PATH
export DYMOLA=/opt/dymola-2021-x86_64
exec ldd /opt/dymola-2021x-x86_64/bin64/platforms/ > dependencies.txt

More troubleshooting

These issues and solutions where discovered by customers:

1. There is a bug in Dymola 2021x and Dymola 2022x (and probably in Dymola 2022). As a result, the Verify Compiler in Simulation>Setup on the Compiler tab does not work. To test the compiler, simulate Modelica.Blocks.Examples.PID_Controller by entering the following in the Dymola Command line: simulateModel(“Modelica.Blocks.Examples.PID_Controller”, stopTime=4, resultFile=”PID_Controller”);

By default, the gcc compiler is installed in Ubuntu.

2. If you do the dependency check of Figure 3 and there isn’t anything missing, then this could be a fix:

Perform the ‘sudo strip…’ command on the version of that is local to the Dymola path and this fixes the issue.

3. In some cases the call to the alien command crashes with:

alien path error

In this case the issue could be this .

4. Dymola 2022 requires Ubuntu 20.04

Written by: Garron Fish with help from Claytex clients – Chief Engineer

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion


Got a question? Just fill in this form and send it to us and we'll get back to you shortly.


© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?