HOW-TO:Install Kodi for Linux: Difference between revisions
RogueScholar (talk | contribs) (Update shell invocations to reflect current best practices for elevated apt processes) |
|||
(36 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Mininav|[[Linux]] {{L2| [[Installing]] }} }} | ||
See [[ | == Installing Kodi on Debian-based distributions == | ||
{{Warning|Debian and Ubuntu versions 9 ("Stretch") and 16.04 LTS ("Xenial") or later, respectively, include their own Kodi builds in their official package repositories, customized to satisfy their interpretations of what is acceptable under their open-source mandates. If you have installed your distribution's Kodi packages, please purge them using the command <syntaxhighlight lang="shell" inline>sudo apt purge kodi*</syntaxhighlight> before trying to install team-xbmc PPA packages.}} | |||
See [[SFTP]] or [http://help.ubuntu.com/community/UsingTheTerminal Click here to find out how to use the terminal.] | |||
Use the command line terminal and enter the following commands. Follow the prompts as you would any other software installation. | Use the command line terminal and enter the following commands. Follow the prompts as you would any other software installation. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
sudo apt | sudo apt install software-properties-common | ||
sudo add-apt-repository | sudo add-apt-repository -ysP team-xbmc/ppa | ||
sudo apt | sudo apt install kodi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{#lst: | {{#lst:Official_Ubuntu_PPA|repos}} | ||
Note that this PPA only provides builds for Ubuntu i386 and Ubuntu amd64 but not for Ubuntu armhf, which can run on a Raspberry Pi. | |||
=== Installing binary add-ons (PVR, audio decoders, audio encoders, screensavers, visualizations, audio DSP) === | === Installing binary add-ons (PVR, audio decoders, audio encoders, screensavers, visualizations, audio DSP) === | ||
{{ | {{See|Ubuntu binary add-ons}} | ||
=== Installing a development build === | === Installing a development build === | ||
{{ | {{See also|Development builds}} | ||
To install a beta/unstable version of {{ | To install a beta/unstable version of {{Kodi}} you must first add the unstable repository, then install XBMC. Use <code>ppa:team-xbmc/xbmc-nightly</code> for nightly builds and <code>ppa:team-xbmc/unstable</code> for [[Development_builds|beta]] builds. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
sudo add-apt-repository | sudo apt install software-properties-common | ||
sudo apt | sudo add-apt-repository -ysP team-xbmc/xbmc-nightly | ||
sudo apt install kodi | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Note that if you have any addons (such as PVR clients), these must be updated as well (they will not be updated automatically): | Note that if you have any addons (such as PVR clients), these must be updated as well (they will not be updated automatically): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
sudo apt | sudo apt install kodi-pvr-mythtv | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Upgrading === | === Upgrading === | ||
<section begin="Ubuntu upgrade" /> | <section begin="Ubuntu upgrade" /> | ||
To update Kodi when a new version is released, just do a general system/package or use the following commands in the terminal (or via [[ | To update Kodi when a new version is released, just do a general system/package or use the following commands in the terminal (or via [[SFTP]]): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
sudo apt | sudo apt update | ||
sudo apt- | sudo apt upgrade --with-new-pkgs | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<section end="Ubuntu upgrade" /> | <section end="Ubuntu upgrade" /> | ||
=== Downgrading to a stable version from a development version === | === Downgrading to a stable version from a development version === | ||
If you install a nightly build or an unstable release and want to return to a stable release, follow these instructions: | If you install a nightly build or an unstable release and want to return to a stable release, follow these instructions: | ||
Remove the unstable or nightly PPA: | |||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
apt-cache policy | grep -Eo 'team-xbmc/(unstable|nightly)' | sudo xargs -r add-apt-repository -ryP | |||
sudo add-apt-repository - | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Then restore the stable version with the following commands: | Then restore the stable version with the following commands: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell"> | ||
sudo add-apt-repository ppa:team-xbmc/ppa | sudo add-apt-repository ppa:team-xbmc/ppa | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get remove kodi kodi- | sudo apt-get remove kodi kodi-x11 | ||
sudo apt-get install kodi | sudo apt-get install kodi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Downgrading between newer and older stable versions === | === Downgrading between newer and older stable versions === | ||
If you want to return to the next most recent stable release, follow these instructions: | |||
Remove the current stable packages and PPA: | |||
<syntaxhighlight lang="shell"> | |||
sudo apt purge kodi* | |||
sudo add-apt-repository -rP team-xbmc/ppa | |||
</syntaxhighlight> | |||
Then install the "oldstable" version with the following commands: | |||
<syntaxhighlight lang="shell"> | |||
sudo add-apt-repository -ysP team-xbmc/kodi-old | |||
sudo apt install kodi | |||
</syntaxhighlight> | |||
=== Reverting to an earlier nightly === | |||
ALthough launchpad doesn't list older nightlies in their PPA, they are usually still available for download directly from the website. Visit the [https://launchpad.net/~team-xbmc/+archive/ubuntu/xbmc-nightly/+packages?field.name_filter=&field.status_filter=superseded&field.series_filter= xbmc-nightly repository index], where you will then have to download the appropriate .deb files and manually install them using <code>sudo dpkg -i [path to downloaded file]</code>. | |||
=== Uninstalling === | === Uninstalling === | ||
If you need to | If you need to uninstall Kodi and purge its global configuration files (for instance, in the attempt to troubleshoot a persistent crash or other errors), do so by using the first of the following commands. If that fails to solve the issue, you will likely need to remove your user settings folder with all of your settings and library data to return to a state equivalent to what existed before Kodi was first installed on the system. This will not delete any videos or music, but just the settings and library data itself, but it is still recommended to keep a backup of them in case it's discovered that they weren't at issue and you are able to effect another solution. An example of how to accomplish a backup and then deletion of your user settings is provided on the last two lines, the highlighted one being responsible for making the backup which can thereafter be found in your home folder with the filename kodi-backup_''timestamp''.tar.xz. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="shell" highlight="2-3"> | ||
sudo apt- | sudo apt purge kodi* | ||
tar cf - "${HOME}/.kodi/" | xz -z9e - >"${HOME}/kodi-backup_$(date +%m%d%y-%H%M).tar.xz" | |||
rm -Ri "${HOME}/.{kodi,xbmc}/" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Embedded/Appliance type install== | |||
=== LibreELEC === | |||
{{main|LibreELEC}} | |||
{{#lst:LibreELEC|intro}} | |||
== Third Party Repositories == | == Third Party Repositories == | ||
Line 98: | Line 102: | ||
The instructions in this section are for unofficial Linux binaries that are un/semi supported by Team Kodi. Most of those binaries use system ffmpeg or even worse totally untested libav, which is not recommended for {{kodi}} as we support ffmpeg only. | The instructions in this section are for unofficial Linux binaries that are un/semi supported by Team Kodi. Most of those binaries use system ffmpeg or even worse totally untested libav, which is not recommended for {{kodi}} as we support ffmpeg only. | ||
=== Debian === | === Debian === | ||
In Debian 9 (Stretch) and 10 (Buster), Kodi is available in the default "main" Debian repository. You can check this with 'apt show kodi' to show the description or 'apt policy kodi' to check available version and whether it's installed. The version in the Debian main repository is an older version (built by Debian) and is not maintained by the Kodi team. | |||
In Debian 9 and 10, update APT and install: | |||
<syntaxhighlight lang=bash> | |||
sudo apt update | |||
sudo apt install kodi | |||
</syntaxhighlight> | |||
For installation if you are using Debian 8 (Jessie), you can use the debian-backports repository. | |||
Add the following lines to your /etc/apt/sources.list file, as superuser (sudo) | Add the following lines to your /etc/apt/sources.list file, as superuser (sudo) | ||
<syntaxhighlight lang= | <syntaxhighlight lang=bash> | ||
# kodi repos | # kodi repos | ||
# starting with debian jessie, debian provides kodi via its backports repository | # starting with debian jessie, debian provides kodi via its backports repository | ||
Line 114: | Line 127: | ||
And then, update APT and install Kodi. | And then, update APT and install Kodi. | ||
<syntaxhighlight lang= | <syntaxhighlight lang=bash> | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install kodi | sudo apt-get install kodi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === Raspbian === | ||
{{see also|HOW-TO:Install Kodi on Raspberry Pi}} | |||
Installing on Raspbian is done with: | |||
== | <syntaxhighlight lang=bash> | ||
sudo apt-get install kodi | |||
</syntaxhighlight> | |||
Upgrading on Raspbian is done with: | |||
<syntaxhighlight lang=bash> | |||
sudo apt-get update | |||
sudo apt-get upgrade | |||
</syntaxhighlight> | |||
== Installation from source == | == Installation from source == | ||
If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. | If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. See our '''[[Compiling Kodi]]''' guide. | ||
{{Updated| | {{Updated|19}} | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:How-to]] | [[Category:How-to]] | ||
[[Category:Installation|Linux]] | [[Category:Installation|Linux]] | ||
Revision as of 04:44, 1 May 2021
Linux Installing |
HOW-TO:Install Kodi for Linux |
Installing Kodi on Debian-based distributions
Debian and Ubuntu versions 9 ("Stretch") and 16.04 LTS ("Xenial") or later, respectively, include their own Kodi builds in their official package repositories, customized to satisfy their interpretations of what is acceptable under their open-source mandates. If you have installed your distribution's Kodi packages, please purge them using the command sudo apt purge kodi* before trying to install team-xbmc PPA packages.
|
See SFTP or Click here to find out how to use the terminal.
Use the command line terminal and enter the following commands. Follow the prompts as you would any other software installation.
sudo apt install software-properties-common sudo add-apt-repository -ysP team-xbmc/ppa sudo apt install kodi
The Kodi repositories are as follows:
Note: Although the URL still has "Team XBMC" in the title, these are the current URLs for Kodi.
https://launchpad.net/~team-xbmc/+archive/ppa | ppa:team-xbmc/ppa |
Final release builds |
https://launchpad.net/~team-xbmc/+archive/unstable | ppa:team-xbmc/unstable |
Betas and release candidates |
https://launchpad.net/~team-xbmc/+archive/xbmc-nightly | ppa:team-xbmc/xbmc-nightly |
Nightly builds |
Note that this PPA only provides builds for Ubuntu i386 and Ubuntu amd64 but not for Ubuntu armhf, which can run on a Raspberry Pi.
Installing binary add-ons (PVR, audio decoders, audio encoders, screensavers, visualizations, audio DSP)
Installing a development build
To install a beta/unstable version of Kodi you must first add the unstable repository, then install XBMC. Use ppa:team-xbmc/xbmc-nightly
for nightly builds and ppa:team-xbmc/unstable
for beta builds.
sudo apt install software-properties-common sudo add-apt-repository -ysP team-xbmc/xbmc-nightly sudo apt install kodi
Note that if you have any addons (such as PVR clients), these must be updated as well (they will not be updated automatically):
sudo apt install kodi-pvr-mythtv
Upgrading
To update Kodi when a new version is released, just do a general system/package or use the following commands in the terminal (or via SFTP):
sudo apt update sudo apt upgrade --with-new-pkgs
Downgrading to a stable version from a development version
If you install a nightly build or an unstable release and want to return to a stable release, follow these instructions:
Remove the unstable or nightly PPA:
apt-cache policy | grep -Eo 'team-xbmc/(unstable|nightly)' | sudo xargs -r add-apt-repository -ryP
Then restore the stable version with the following commands:
sudo add-apt-repository ppa:team-xbmc/ppa sudo apt-get update sudo apt-get remove kodi kodi-x11 sudo apt-get install kodi
Downgrading between newer and older stable versions
If you want to return to the next most recent stable release, follow these instructions:
Remove the current stable packages and PPA:
sudo apt purge kodi* sudo add-apt-repository -rP team-xbmc/ppa
Then install the "oldstable" version with the following commands:
sudo add-apt-repository -ysP team-xbmc/kodi-old sudo apt install kodi
Reverting to an earlier nightly
ALthough launchpad doesn't list older nightlies in their PPA, they are usually still available for download directly from the website. Visit the xbmc-nightly repository index, where you will then have to download the appropriate .deb files and manually install them using sudo dpkg -i [path to downloaded file]
.
Uninstalling
If you need to uninstall Kodi and purge its global configuration files (for instance, in the attempt to troubleshoot a persistent crash or other errors), do so by using the first of the following commands. If that fails to solve the issue, you will likely need to remove your user settings folder with all of your settings and library data to return to a state equivalent to what existed before Kodi was first installed on the system. This will not delete any videos or music, but just the settings and library data itself, but it is still recommended to keep a backup of them in case it's discovered that they weren't at issue and you are able to effect another solution. An example of how to accomplish a backup and then deletion of your user settings is provided on the last two lines, the highlighted one being responsible for making the backup which can thereafter be found in your home folder with the filename kodi-backup_timestamp.tar.xz.
sudo apt purge kodi* tar cf - "${HOME}/.kodi/" | xz -z9e - >"${HOME}/kodi-backup_$(date +%m%d%y-%H%M).tar.xz" rm -Ri "${HOME}/.{kodi,xbmc}/"
Embedded/Appliance type install
LibreELEC
LibreELEC (short for "Libre Embedded Linux Entertainment Center") is small and very fast booting, open source JeOS (Just enough Operating System). LibreELEC is a complete media center software suite for embedded systems and computers, as it comes with a pre-configured version of Kodi and optional third-party PVR backend software.
Third Party Repositories
The instructions in this section are for unofficial Linux binaries that are un/semi supported by Team Kodi. Most of those binaries use system ffmpeg or even worse totally untested libav, which is not recommended for Kodi as we support ffmpeg only.
Debian
In Debian 9 (Stretch) and 10 (Buster), Kodi is available in the default "main" Debian repository. You can check this with 'apt show kodi' to show the description or 'apt policy kodi' to check available version and whether it's installed. The version in the Debian main repository is an older version (built by Debian) and is not maintained by the Kodi team.
In Debian 9 and 10, update APT and install:
sudo apt update sudo apt install kodi
For installation if you are using Debian 8 (Jessie), you can use the debian-backports repository.
Add the following lines to your /etc/apt/sources.list file, as superuser (sudo)
# kodi repos # starting with debian jessie, debian provides kodi via its backports repository # remember: those packages are not supported by team kodi deb http://http.debian.net/debian jessie-backports main
And then, update APT and install Kodi.
sudo apt-get update sudo apt-get install kodi
Raspbian
Installing on Raspbian is done with:
sudo apt-get install kodi
Upgrading on Raspbian is done with:
sudo apt-get update sudo apt-get upgrade
Installation from source
If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. See our Compiling Kodi guide.