|
|
(18 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| If you have any trouble getting things to build due to missing 3rd-party package dependencies, read on to learn what to do. If you need help, see https://community.kde.org/Get_Involved#Getting_in_Touch_and_Working_Together.
| | See https://develop.kde.org/docs/getting-started/building/help-dependencies |
| | |
| == How to install the dependencies of one package ==
| |
| === KDE neon, Debian, Ubuntu, Kubuntu, etc ===
| |
| All the build packages known by the package you want to build can be installed by running:
| |
| | |
| <code>sudo apt build-dep <package you want to build></code>
| |
| | |
| For example, to install the build dependencies for Dolphin, run:
| |
| | |
| <code>sudo apt build-dep dolphin</code>
| |
| | |
| === Fedora===
| |
| If dependencies are missing for a specific RPM package, you can run:
| |
| | |
| <code>sudo dnf builddep <name_of_rpm_package></code>
| |
| | |
| For example, to install the build dependencies for Dolphin, run:
| |
| | |
| <code>sudo dnf builddep dolphin</code>
| |
| | |
| === openSUSE ===
| |
| Generally you can install the required -devel packages that are needed to build some KDE software from source by using <code>zypper</code> (as root, or by using <code>sudo</code>), e.g. to install the -devel packages required to build dolphin from source:
| |
| {{Input|1=<nowiki>
| |
| # zypper --plus-content repo-source source-install --build-deps-only dolphin
| |
| </nowiki>}}
| |
| | |
| replace ''dolphin'' with some other package name, e.g. to build ''ktexteditor'' from source:
| |
| {{Input|1=<nowiki>
| |
| # zypper --plus-content repo-source source-install --build-deps-only ktexteditor
| |
| </nowiki>}}
| |
| | |
| Note that the <code>--plus-content</code> option in the above commands means you don't need to have the source repository enabled all the time, <code>--plus-content</code> will make zypper temporarily enable it to get the info it needs.
| |
| | |
| openSUSE (and most other RPM-based Linux distributions) support cmake() BuildRequires, which means you can install a development package like so:
| |
| {{Input|1=<nowiki>
| |
| # zypper install 'cmake(KF5KIO)'
| |
| </nowiki>}}
| |
| | |
| the part between the parenthesis ''KF5KIO'' is going to be in the error message that CMake will print in the terminal if you try to build something that requires e.g. KIO if KIO development headers aren't installed.
| |
| | |
| Any other dependencies can be figured out and installed as you continue building the modules one by one.
| |
| | |
| == Quick fixes for package manager errors ==
| |
| The above lists might not always be working out of the box on your specific distribution or might be out of date for individual packages. In many cases removing single packages from the lists above still allows you to build many KDE frameworks and applications.
| |
| | |
| In case it is a package added by a regex, you can exclude the specific package by a workaround using sed. Let us assume for an example that we want to install "libkf5.*-dev" on deb-based systems but have uninstallable packages libkf5example1-dev, libkf5example2-dev. Then we install all "libkf5.*-dev" packages excluding libkf5example1-dev and libkf5example2-dev through:
| |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">$ sudo apt install $(apt-cache search -n "libkf5.*-dev" | sed 's/ - .*//' | sed '/libkf5example1-dev/d' | sed '/libkf5example2-dev/d')</pre>
| |