If you are installing OpenCPN for the first time on a computer with Ubuntu, or any other Linux flavor, you have to go through a few steps to make sure that all dependencies are met. Ubuntu uses “deb” packages and Fedora uses the “rpm” packages.
For Debian based Linuxes: Make sure that you belong to the “dialout” group. To find out, run the “$groups” command. If you're not in “dialout”, add yourself with the command “$sudo usermod -a -G dialout $USER”. Check this straight away, it will save you from frustration later on. If there is a problem connecting the GPS to a physical port, such as /dev/ttyS0, the reason is probably that you don't belong to “dialout”.
For other Linux distributions, replace “dialout” above, with the result of this command: $stat -c %G /dev/ttyS0
It is recommended that you install the “xcalib” program, that is necessary to dim the screen for night time usage. Use your favourite package manager or just issue $sudo apt-get install xcalib from the command line (for debian based distros).
It is recommended that you install the “xdg-utils” program, that helps the grib plugin compose a SailDoc grib-request-mail. Use your favourite package manager or just issue $sudo apt-get install xdg-utils from the command line (for debian based distros).
On Ubuntu, start “System→Administration→Synaptic”. In Synaptic go to “Settings→Repositories” and tick the box “Community-maintained Open Source software (universe)”. Close Synaptic.
-
For Ubuntu, only use the download with an Ubuntu version number if you have exactly that version. Otherwise use the link “
Download OpenCPN 3.X.X for all other *Ubuntu's”.
Use the stable release for navigation en route, or if you just started using OpenCPN.
Click on the downloaded package. An installation manager will guide you on most Linux distributions. All dependencies should automatically be installed. For most Linux installations, this is all you have to do. Consult the following 3 paragraphs if you run into trouble.
If you have problems with dependencies, run the recommended command line in the next paragraph. First check that you really have downloaded the correct version of OpenCPN. se above.
sudo gdebi
<downloaded_opencpn_file.deb>. The command “gdebi” will automatically install the dependencies for you.
It is also possible to install the package via dpkg or rpm, on the condition that all dependencies are met. To make sure that this is the case on Ubuntu, open a terminal window to get a command line, (Applications→Accessories→Terminal) and copy and paste the following line:
sudo apt-get install libwxgtk2.8-0 libwxbase2.8-0 wx-common libglu1-mesa libgl1-mesa-glx zlib1g bzip2 gpsd gpsd-clients xcalib xdg-utils libportaudio2 libkml0 libtinyxml2.6.2 liburiparser1 zlib1g libexpat1
Then proceed with the commands below.
The binary will be installed to /usr/bin/opencpn and the static data used by the program will be in /usr/share/opencpn
If this is a new installation, click on the Options icon

and configure your GPS source, chart directories, and other settings.
If there is a problem with sound, make sure that you, as a user, belongs to the “audio” group. To find out, run the “$groups” command. If you're not in “audio”, add yourself with “$sudo usermod -a -G audio $USER”
If you are running Debian Squeeze and want to install OpenCPN from the distributions .deb package, you will need to install with something like this in order to satisfy install dependencies related to libtinyxml:
$sudo dpkg -i –force-depends opencpn_3.1.1327-1_i386.deb
Add the OpenCPN ppa repository as explained in configuring Ubuntu PPA
- If you are using Synaptic, add the repository, reload the software sources as it suggests, search for and install opencpn
- No need to install anything manually
Starting with openSUSE 11.4 and onwards, wxWidgets framework is shipped in several mutually exclusive flavors — “STL”, “noSTL” (“wxContainer”), “ANSI”, — of which OpenCPN is only compatible with “noSTL” (“wxContainer”) flavor.
Older versions of OpenCPN support wxWidgets 2.8, which does not have a “default” flavor in openSUSE, and of which any flavor may be installed alongside with each other, but OpenCPN stricly requires “wxContainer”.
Modern versions of OpenCPN, starting with beta branch 4.5, use functionality that is only available in wxWidgets 2.9, but since that branch is not packaged by openSUSE maintainers, then wxWidgets 3.0 becomes a must. That one defaults to “STL” flavor, which is not appropriate for OpenCPN and will result in multitude of mysterious compilation errors if used, — OpenCPN requires “noSTL”.
To install the required wxWidgets 3.0, use the following command:
sudo zypper install wxWidgets-3_0-nostl-devel
For legacy OpenCPN builds against the older wxWidgets 2.8, some virtual wx libraries (with no real content) must also be installed in addition to real-deal wx libraries themselves:
sudo zypper install wxWidgets-wxcontainer-compat-lib-config libwx_baseu-2_8-0-compat-lib-wxcontainer libwx_baseu_net-2_8-0-compat-lib-wxcontainer libwx_baseu_xml-2_8-0-compat-lib-wxcontainer libwx_gtk2u_adv-2_8-0-compat-lib-wxcontainer libwx_gtk2u_aui-2_8-0-compat-lib-wxcontainer libwx_gtk2u_core-2_8-0-compat-lib-wxcontainer libwx_gtk2u_gl-2_8-0-compat-lib-wxcontainer libwx_gtk2u_html-2_8-0-compat-lib-wxcontainer
The above commands will also automatically trigger installation of underlying real-deal libraries and other dependencies if they were not present before.