.TH "doc_INSTALL_md" 3elektra "Fri Aug 4 2023" "Version 0.11.0" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME doc_INSTALL_md \- Install .SH "Status" .PP The graph below shows an (incomplete) list of available packages for Elektra\&. .PP \fC\fP.SH "Linux" .PP For the following Linux distributions and package managers 0\&.9 packages are available: .PP .IP "\(bu" 2 \fCArch Linux (AUR)\fP .IP "\(bu" 2 \fCOpenwrt\fP .IP "\(bu" 2 \fCLinuxBrew\fP .PP .SS "Debian/Ubuntu" We provide repositories for latest releases and latest builds from master (suite postfixed with \fC-unstable\fP) for following Debian-based distributions: .PP .IP "\(bu" 2 Debian Bullseye .IP "\(bu" 2 Debian Buster .IP "\(bu" 2 Ubuntu Focal .IP "\(bu" 2 Ubuntu Bionic .PP .PP To use our stable repositories with our latest releases, following steps need to be made: .PP .IP "1." 4 Run \fCsudo apt-key adv --keyserver keyserver\&.ubuntu\&.com --recv-keys F26BBE02F3C315A19BF1F791A9A25CC1CC83E839\fP to obtain the key\&. .IP "2." 4 Add \fCdeb https://debs.libelektra.org/ main\fP into \fC/etc/apt/sources\&.list\fP where \fC\fP and \fC\fP is the codename of your distributions e\&.g\&.\fCfocal\fP,\fCbionic\fP,\fCbuster\fP, etc\&. .PP This can also be done using: .PP .PP .PP .nf # Example for Ubuntu Focal sudo apt-get install software-properties-common apt-transport-https echo "deb https://debs\&.libelektra\&.org/focal focal main" | sudo tee /etc/apt/sources\&.list\&.d/elektra\&.list .fi .PP .PP Or alternatively, you can use (if you do not mind many dependences just to add one line to a config file): .PP .PP .nf # Example for Ubuntu Focal sudo apt-get install software-properties-common apt-transport-https sudo add-apt-repository "deb https://debs\&.libelektra\&.org/focal focal main" .fi .PP .PP If you would like to use the latest builds of master, append \fC-unstable\fP to \fC\fP\&. .PP The \fCetc/apt/source\&.list\fP entry must look like following: \fCdeb https://debs.libelektra.org/ -unstable main\fP .PP E\&.g\&. \fCdeb https://debs.libelektra.org/focal focal-unstable main\fP .PP .IP "3." 4 Run \fCsudo apt-get update\fP\&. .PP .PP .RS 4 NOTE: for Ubuntu Bionic the yamlcpp plugin is excluded due to missing dependencies and therefore the package \fClibelektra5-yamlcpp\fP is not available\&. .RE .PP .SS "Fedora" We provide repositories for latest releases and latest builds from master (suite postfixed with \fC-unstable\fP) for Fedora 33 and Fedora 34 .PP For our stable repository with our latest releases: .PP .PP .nf wget https://rpms\&.libelektra\&.org/fedora-34/libelektra\&.repo -O libelektra\&.repo; sudo mv libelektra\&.repo /etc/yum\&.repos\&.d/; sudo yum update .fi .PP .PP Or alternatively you can use dnf to add this repo: .PP .PP .nf sudo dnf config-manager --add-repo https://rpms\&.libelektra\&.org/fedora-34/libelektra\&.repo .fi .PP .PP For our latest builds from master append \fC-unstable\fP to the suite name: .PP .PP .nf wget https://rpms\&.libelektra\&.org/fedora-34-unstable/libelektra\&.repo -O libelektra\&.repo; sudo mv libelektra\&.repo /etc/yum\&.repos\&.d/; sudo yum update .fi .PP .PP Or alternatively you can use dnf to add this repo: .PP .PP .nf sudo dnf config-manager --add-repo https://rpms\&.libelektra\&.org/fedora-34-unstable/libelektra\&.repo .fi .PP .SS "openSUSE" We provide repositories for latest releases and latest builds from master (suite postfixed with \fC-unstable\fP) for openSUSE Leap 15\&.3 .PP For our stable repository with our latest releases: .PP .RS 4 NOTE: stable packages will be available as of the \fC0\&.9\&.8\fP release\&. .RE .PP .PP .nf sudo zypper ar -f https://rpms\&.libelektra\&.org/opensuse-leap-15\&.3 libelektra sudo zypper update .fi .PP .PP For our latest builds from master append \fC-unstable\fP to the suite name: .PP .PP .nf sudo zypper ar -f https://rpms\&.libelektra\&.org/opensuse-leap-15\&.3-unstable libelektra-unstable sudo zypper update .fi .PP .SS "Arch Linux" We provide an package for Arch Linux through the \fCArch User Repository\fP .PP You can either install it using any AUR helper or manually using makepkg .SS "Manual install" Make you have \fCbase-devel\fP and \fCgit\fP installed (\fCsudo pacman -S base-devel git\fP) .PP Then you can install it using the following commands: .PP .PP .nf cd /tmp git clone https://aur\&.archlinux\&.org/libelektra\&.git cd libelektra makepkg -si .fi .PP .SS "Install" To get all packaged plugins, bindings and tools install: .PP .PP .nf # For Debian based distributions apt-get install libelektra5-all # For Fedora based distributions dnf install libelektra5-all # For openSUSE zypper install libelektra5-all .fi .PP .PP For a small installation with command-line tools available use: .PP .PP .nf # For Debian based distributions apt-get install elektra-bin # For Fedora based distributions dnf install elektra-bin # For openSUSE zypper install elektra-bin .fi .PP .PP To install all debugsym/debuginfo packages: .PP .PP .nf # For Debian based distributions apt-get install elektra-dbg # For Fedora based distributions dnf install elektra-dbg # For openSUSE zypper install elektra-dbg .fi .PP .PP If you want to install individual debugsym/debuginfo packages: .PP .PP .nf # For Debian based distributions apt-get install -dbgsym # e\&.g\&. apt-get install libelektra5-dbgsym # For Fedora based distributions dnf debuginfo-install # e\&.g\&. dnf debuginfo-install libelektra5 # For openSUSE zypper install -debuginfo # e\&.g\&. zypper install libelektra5-debuginfo .fi .PP .PP To build Debian/Ubuntu Packages from the source you might want to use: .PP .PP .nf make package # See CPack below .fi .PP .SH "macOS" .PP You can install Elektra using \fCHomebrew\fP via the shell command: .PP .PP .nf brew install elektra .fi .PP .PP \&. We also provide a tap containing a more elaborate formula \fChere\fP\&. .SH "Windows" .PP Installation for WSL is described \fBhere\fP\&. .PP If you prefer native but in functionality limited version you can download MinGW \fC32-bit\fP and \fC64-bit\fP builds\&. .PP Otherwise please refer to the section \fCOS Independent\fP below\&. .SH "OS Independent" .PP First follow the steps in \fBCOMPILE\fP\&. .PP After you completed building Elektra on your own, there are multiple options how to install it\&. For example, with make or CPack tools\&. We recommend using the packages from our build server or that you generate your own packages with CPack\&. .SS "CPack" The current supported systems are: Debian, Ubuntu and Fedora\&. .PP Then use: .PP .PP .nf make package .fi .PP .PP which will create packages for distributions where a Generator is implemented\&. .PP You can find the generated packages in the \fCpackage\fP directory of the build directory\&. .PP .RS 4 NOTE: If all plugins/bindings/tools a package includes are excluded, the package will not be generated\&. .RE .PP .SS "Debian/Ubuntu" First make sure you have \fCdebhelper\fP and \fCd-shlibs\fP installed: .PP .PP .nf apt-get install debhelper d-shlibs .fi .PP .PP (Otherwise you'll see an error file utility is not available, breaking \fCCPACK_DEBIAN_PACKAGE_SHLIBDEPS\fP and \fCCPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS\fP\&.) .PP On Debian-based distributions you will need to set \fCLD_LIBRARY_PATH\fP before generating the package\&. Simply \fCcd\fP into the build directory and run following command: .PP .PP .nf LD_LIBRARY_PATH=$(pwd)/lib:${LD_LIBRARY_PATH} make package -j2 .fi .PP .PP To install the packages run this in the \fCpackage\fP directory: .PP .PP .nf sudo apt-get install \&./* .fi .PP .PP If any dependency problems appear, run following command to install the missing dependencies: .PP .PP .nf sudo apt-get -f install .fi .PP .SS "Fedora" For packaging Fedora has \fCrpmdevtools\fP as an additional dependency: .PP .PP .nf sudo yum install -y rpmdevtools .fi .PP .PP When configuring CMake it is also required to set the \fCCMAKE_BUILD_TYPE\fP to \fCRelease\fP\&. For instance, a minimal configuration is .PP .PP .nf cmake \&.\&. -DCMAKE_BUILD_TYPE="Release" make package .fi .PP .PP To install RPM packages we recommend using \fCyum localinstall\fP since installing with \fCrpm\fP doesn't resolve missing dependencies\&. .PP Run following command in the \fCbuild/package\fP directory: .PP .PP .nf sudo yum localinstall * .fi .PP .PP Depending on the system configuration one might also need to configure and run \fCldconfig\fP, for instance .PP .PP .nf sudo echo "/usr/local/lib" >> /etc/ld\&.so\&.conf sudo ldconfig .fi .PP .SS "make" .PP .nf sudo make install sudo ldconfig # See troubleshooting below .fi .PP .PP To uninstall Elektra use (will not be very clean, e\&.g\&. it will not remove directories and \fC*\&.pyc\fP files): .PP .PP .nf sudo make uninstall sudo ldconfig .fi .PP .PP or in the build directory (will not honor \fCDESTDIR\fP!): .PP .PP .nf xargs rm < install_manifest\&.txt .fi .PP .SH "Troubleshooting" .PP .SS "Error Loading Libraries" If you encounter the problem that the library can not be found (output like this) .PP .PP .nf kdb: error while loading shared libraries: libelektra-core\&.so\&.4: cannot open shared object file: No such file or directory .fi .PP .PP or: .PP .PP .nf kdb: error while loading shared libraries: libelektratools\&.so\&.2: cannot open shared object file: No such file or directory .fi .PP .PP you need to place a configuration file at \fC/etc/ld\&.so\&.conf\&.d/\fP (e\&.g\&. \fC/etc/ld\&.so\&.conf\&.d/elektra\&.conf\fP)\&. Note that under Alpine Linux this file is called \fC/etc/ld-musl-x86_64\&.path\fP or similar, depending on your architecture\&. .PP Add the path where the library has been installed (on Alpine Linux this had to be \fCusr/lib/elektra\fP for it to work) .PP .PP .nf /usr/lib/local/ .fi .PP .PP and run \fCldconfig\fP as root\&. .SH "Installation Manuals" .PP For some plugins and tools that ship with Elektra, additional installation manuals have been written\&. You can find them in the \fBtutorial overview\fP\&. .SH "See Also" .PP .IP "\(bu" 2 \fBCOMPILE\fP\&. .IP "\(bu" 2 \fBTESTING\fP\&. .PP