我花了 6 个小时研究,找到了 PPA 存储库,并且在那里看到了它,但无法安装。我是 Ubuntu 新手,只是想学习,但在这里遇到了障碍。救命!
我使用了这些命令:
sudo add-apt-repository -r -y ppa:team-xbmc/ppa
sudo add-apt-repository -y ppa:team-xbmc/kodi-old
sudo apt-get update
sudo apt-get install kodi=2:16* kodi-bin=2:16*
答案1
我建议反对在 Bionic Beaver 上构建这个旧版本的 Kodi,但我还是把它当作一个挑战!(当然,我知道你有一个非常具体的需要为了这版本)。它构建了许多较旧图书馆、下载大量文件 并且只是简单的努力工作
然而,尽管这是一个有点艰巨的过程,本指南给了我一个在 Bionic Beaver 上运行的 Kodi 16.1 的副本,如果你决定使用它,它应该在你的 Bionic 系统上也能很好地工作。我有详尽的在新的虚拟机上对此进行了测试,考虑在提交到主机之前自己在虚拟机中对其进行测试?
1.下载依赖项:
可以使用找到 Kodi 软件包的依赖项sudo apt-get build-dep kodi
,并汇编了以下列表,应将其复制并粘贴到终端窗口中。在新的虚拟机上,这是一个 314mb 的下载...
sudo apt-get install antlr autoconf automake autopoint autotools-dev \
build-essential ca-certificates-java cmake cmake-data cpp-6 curl debhelper \
default-jre default-jre-headless default-libmysqlclient-dev dh-autoreconf \
dh-python dh-strip-nondeterminism doxygen dpkg-dev fontforge-common \
fontforge-nox g++ g++-6 g++-7 gawk gcc gcc-6 gcc-6-base gcc-7 \
gir1.2-harfbuzz-0.0 googletest gperf groovy icu-devtools ivy java-common \
junit4 libantlr-java libao-dev libapache-pom-java libasan3 libasan4 libasm-java \
libasound2-dev libass-dev libass9 libatk-wrapper-java libatk-wrapper-java-jni \
libatomic1 libavahi-client-dev libavahi-common-dev libavcodec-dev libavcodec57 \
libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev \
libavresample3 libavutil-dev libavutil55 libbluetooth-dev libbluray-dev \
libbluray2 libboost-atomic1.65-dev libboost-atomic1.65.1 \
libboost-chrono1.65-dev libboost-chrono1.65.1 libboost-date-time1.65-dev \
libboost-dev libboost-serialization1.65-dev libboost-serialization1.65.1 \
libboost-system1.65-dev libboost-thread-dev libboost-thread1.65-dev \
libboost1.65-dev libbs2b0 libbsf-java libbz2-dev libc-dev-bin libc6-dev \
libcap-dev libcapnp-0.6.1 libcdio-dev libcec-dev libcec4 libchromaprint1 \
libcilkrts5 libclang1-6.0 libcommons-cli-java libcommons-lang-java \
libcommons-logging-java libcommons-parent-java libcrossguid-dev \
libcrossguid0 libcrystalhd3 libcurl4 libcurl4-gnutls-dev libcwiid-dev \
libcwiid1 libdbus-1-dev libdrm-dev libegl1-mesa-dev libexpat1-dev \
libfile-stripnondeterminism-perl libflite1 libfluidsynth1 libfontconfig1-dev \
libfontforge2 libfreetype6-dev libfribidi-dev libfstrcmp-dev libfstrcmp0 \
libgcc-6-dev libgcc-7-dev libgcrypt20-dev libgdraw5 libgif-dev libgif7 \
libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglib2.0-dev-bin \
libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libgme0 libgmp-dev \
libgmpxx4ldbl libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev \
libgnutlsxx28 libgpg-error-dev libgraphite2-dev libgsm1 libgtest-dev \
libhamcrest-java libharfbuzz-dev libharfbuzz-gobject0 \
libhawtjni-runtime-java libibus-1.0-dev libice-dev libicu-dev \
libicu-le-hb-dev libicu-le-hb0 libiculx60 libidn2-0-dev libidn2-dev \
libiso9660-10 libiso9660-dev libitm1 libjansi-java libjansi-native-java \
libjline2-java libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjsoncpp1 \
liblcms2-dev liblsan0 libltdl-dev liblzo2-dev libmad0 libmicrohttpd-dev \
libmicrohttpd12 libmirclient-dev libmirclient9 libmircommon-dev \
libmircommon7 libmircookie-dev libmircookie2 libmircore-dev libmircore1 \
libmirprotobuf3 libmodplug-dev libmodplug1 libmpx2 libmysofa0 \
libmysqlclient-dev libmysqlclient20 libnfs-dev libnfs11 libnorm1 libopengl0 \
libopenjp2-7 libopenmpt0 libp11-kit-dev libp8-platform-dev libp8-platform2 \
libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpgm-5.2-0 libplist-dev \
libpng-dev libpostproc-dev libpostproc54 libprotobuf-dev libprotobuf-lite10 \
libpthread-stubs0-dev libpulse-dev libpython-dev libpython-stdlib \
libpython2.7-dev libqdox-java librhash0 librsvg2-bin librubberband2 \
libsdl2-2.0-0 libsdl2-dev libsdl2-image-2.0-0 libsdl2-image-dev \
libsdl2-mixer-2.0-0 libsdl2-mixer-dev libservlet3.1-java libset-scalar-perl \
libshairport-dev libshairport2 libshine3 libsigsegv2 libsm-dev \
libsmbclient-dev libsnappy1v5 libsndio-dev libsndio6.1 libsoxr0 libspiro0 \
libsqlite3-dev libssh-gcrypt-4 libssh-gcrypt-dev libstdc++-6-dev \
libstdc++-7-dev libswresample-dev libswresample2 libswscale-dev libswscale4 \
libtag1-dev libtasn1-6-dev libtinyxml-dev libtinyxml2.6.2v5 libtool libtsan0 \
libubsan0 libudev-dev libunbound2 libuninameslist1 libuv1 libva-dev \
libva-drm2 libva-glx2 libva-wayland2 libva-x11-2 libva2 libvdpau-dev \
libvdpau1 libwayland-bin libwayland-dev libx11-dev libx11-xcb-dev \
libx264-152 libx265-146 libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev \
libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev \
libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb1-dev \
libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev \
libxi-dev libxinerama-dev libxkbcommon-dev libxml2-dev libxmu-dev \
libxmu-headers libxpp3-java libxrandr-dev libxrender-dev libxshmfence-dev \
libxslt1-dev libxss-dev libxstream-java libxt-dev libxv-dev libxvidcore4 \
libxxf86vm-dev libyajl-dev libzmq5 libzvbi-common libzvbi0 linux-libc-dev m4 \
make mesa-common-dev mysql-common nettle-dev openjdk-11-jre \
openjdk-11-jre-headless pkg-config po-debconf python python-dev \
python-minimal python-pil python2.7 python2.7-dev python2.7-minimal \
python3-distutils python3-lib2to3 swig swig3.0 uuid-dev valgrind \
x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev \
x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev \
x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev yasm zlib1g-dev \
checkinstall libglew-dev libmpeg2-4-dev liblogg4-dev libtiff-dev \
libssl-dev libcrypto++-dev libusb-dev liblockfile-dev
2. 创建构建目录并下载源:
现在创建一个构建目录,切换到该目录并下载并提取 Kodi 16.1 的源代码。一次使用以下命令:
mkdir $HOME/kodi_build && cd $HOME/kodi_build
wget https://github.com/xbmc/xbmc/archive/16.1-Jarvis.tar.gz
tar xvf 16.1-Jarvis.tar.gz
需要一个补丁来使 cximage 能够使用较新的 gcc 进行构建,并且以下一行命令将从较旧的 Kodi 提交中下载此补丁:
wget https://github.com/xbmc/xbmc/commit/8f82e51563f0e1bc9b7a8adf669ad2b66e7ce3e5.patch \
-O kodi_16.1_cxximage_gcc_fix.diff
3. 构建 kodi:
首先创建所需的自动构建工具/配置:
cd $HOME/kodi_build/xbmc-16.1-Jarvis
./bootstrap
现在构建、下载、编译和安装更多所需的依赖项。为了(希望)更清晰,我将它们分为几个部分:
i)从 Kodi extras 文件夹构建一些依赖项:
Kodi 已为一些比较棘手的依赖项建立了构建系统,我们在这里使用它。每次使用以下命令 1 个:
sudo make -C tools/depends/target/crossguid PREFIX=/usr/local
sudo make -C tools/depends/target/libdcadec PREFIX=/usr/local
ii)找到一份合适的 Jasper 副本:
Jasper 已从 Ubuntu 中消失,因此从我们的 Debian 同事那里检索它,按给定的顺序一次使用以下命令::
wget http://security.debian.org/debian-security/pool/updates/main/j/jasper/libjasper1_1.900.1-13+deb7u6_amd64.deb
wget http://security.debian.org/debian-security/pool/updates/main/j/jasper/libjasper-dev_1.900.1-13+deb7u6_amd64.deb
sudo dpkg -i libjasper1_1.900.1-13+deb7u6_amd64.deb
sudo dpkg -i libjasper-dev_1.900.1-13+deb7u6_amd64.deb
iii)编译所需的旧版本的 libcec:
此版本的 kodi 需要旧版本的 libcec,以下将安装此版本。使用这些旧版本并不理想,但这是在较新版本上构建旧软件的代价的一部分...
首先是 libplatform(libcec 所需),来自 Xenial xbmc PPA:
wget http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/pool/main/p/platform/libplatform2_2.0.1-1~xenial_amd64.deb
wget http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/pool/main/p/platform/libplatform-dev_2.0.1-1~xenial_amd64.deb
sudo dpkg -i libplatform2_2.0.1-1~xenial_amd64.deb
sudo dpkg -i libplatform-dev_2.0.1-1~xenial_amd64.deb
然后编译所需版本的libcec并将其安装到/usr/local
:
cd $HOME/kodi_build
wget https://github.com/Pulse-Eight/libcec/archive/libcec-3.0.0.tar.gz
tar xvf libcec-3.0.0.tar.gz && cd libcec-libcec-3.0.0
mkdir build && cd build
cmake ..
make && sudo make install
iv)编译kodi:
最后编译并修补 Kodi 源:
(请注意,即将到来的 ./configure 过程将下载并使用其自己的 FFmpeg 副本,这可以被禁用,但对于此版本,我们将允许它发生!此过程的详细信息包含在 中tools/depends/target/ffmpeg
)。
cd $HOME/kodi_build/xbmc-16.1-Jarvis
patch -p1 < ../kodi_16.1_cxximage_gcc_fix.diff
./configure --disable-wayland
make -j 4
sudo make install
5.必填截图:
下面是在我的 Bionic Beaver 系统上运行的 Kodi 16.1 的屏幕截图:
您需要测试此版本以确保已使用所有适当的选项来满足您的特定需求。随时可以进行调整 :)。
笔记:
按照本指南创建的 Kodi 配置如下,其中有几个部分标记为“否”,如果需要的话无疑可以进行处理:
------------------------
Kodi Configuration:
------------------------
Kodi Version: 16.1
git Rev.: Unknown
Debugging: Yes
Profiling: No
Optimization: Yes
SWIG Available: Yes
JRE Available: Yes
Doxygen Available: Yes
Crosscomp.: No
target ARCH:
target CPU:
OpenGL: Yes
ALSA: Yes
DBUS: Yes
VDPAU: Yes
VAAPI: Yes
VTBDecoder: No
OpenMax: No
Joystick: Yes
Touch skin: No
X11: Yes
Wayland: No
Bluray: Yes
TexturePacker:Yes
MID Support: No
ccache: No
ALSA Support: Yes
PulseAudio: Yes
DVDCSS: Yes
Google Test Framework Configured: Yes
Google Breakpad Configured: No
Avahi: Yes
mDNSEmbedded: No
Non-free: Yes
ASAP Codec: No
MySQL: Yes
Webserver: Yes
libssh support: Yes
libRTMP support: No
libsmbclient support: Yes
libnfs client support:Yes
libgif support: Yes
AirPlay support: Yes
AirTunes support: No
UPnP support: Yes
Optical drive: Yes
libudev support: Yes
libusb support: No
libcec support: Yes
libcap support: Yes
additional players: No
additional codecs: No
prefix: /usr/local
------------------------
答案2
这您使用的 PPA名称中有“old”。这表明它不太可能与新的Ubuntu Bionic Beaver(18.04)——此 PPA 支持的最新 Ubuntu 版本是 Xenial(16.04)。
如果你对当前的 Kodi 版本满意,那么有一个“Kodi”团队 PPA没有“旧”后缀,因此请使用:
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi
2:17.6+git20180430.1623-final-0bionic
这将在 Ubuntu Bionic 上运行时安装当前版本。
如果您明确想要安装 Kodi Jarvis(版本 16),那么您应该考虑使用仍然受支持的 Ubuntu 16.04(直到 2021 年)。如果您不想保留当前版本,您可以双启动两个 Ubuntu 版本或虚拟化其中一个。您也可以尝试自己为 18.04 构建 Kodi Jarvis但这可能相当困难。
答案3
今天我尝试了 andrew.46 的答案,但没有成功,于是我研究了替代方案。我使用此版本的 Kodi,因为我的客户也像 OP 一样评论过,而且可能很多人来这里也是出于同样的原因。因此,无头客户端实际上更好/更受欢迎,目前我认为这是 Ubuntu 18 的唯一选择。
有一个维护的 Docker 映像kodi-headless:Jarvis
在 Ubuntu 18 上运行,可以按如下方式设置:
注意:这不是最安全的设置方法,容器以 root 身份运行,可以访问主机网络等。我将其留给最终用户来研究安全功能。
此外,配置存储在主机操作系统的 /root/.kodi/ 下。我从未接触过 kodi 容器中的 CLI,只需将我当前的用户数据移动到 /root/.kodi/ 启动容器并进行测试!
安装 Docker:
cat << 'EOL' >apt_docker_install.sh
sudo apt-get remove -y docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
EOL
chmod +x apt_docker_install.sh
./apt_docker_install.sh
设置数据库:
sudo apt-get update
sudo apt-get install -y mariadb-server mariadb-client
cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep bind
sed -i -e 's|127.0.0.1|0.0.0.0|g' /etc/mysql/mariadb.conf.d/50-server.cnf
cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep bind
systemctl restart mysql
systemctl status mysql
mysql
CREATE USER 'kodi' IDENTIFIED BY 'kodi';
GRANT ALL PRIVILEGES ON MyVideos99.* TO 'kodi';
GRANT ALL PRIVILEGES ON MyMusic56.* TO 'kodi';
flush privileges;
exit;
创建 Kodi 容器:
cd ~
cat << 'EOL' >kodi_jarvis_bionic_beaver.sh
docker pull linuxserver/kodi-headless:Jarvis
docker create --name=kodi-headless --net=host -e PGID=0 -e PUID=0 -v /root/.kodiconfig:/config/.kodi -e VERSION=16 linuxserver/kodi-headless:Jarvis
#Note: All configs now under ~/.kodi/ on host
docker start kodi-headless
cd ~
echo "alias kodicli='docker exec -it kodi-headless /bin/bash'" >> .bashrc
source .bashrc
kodicli
EOL
chmod +x kodi_jarvis_bionic_beaver.sh
./kodi_jarvis_bionic_beaver.sh
自动启动容器:
cat << 'EOL' >/etc/systemd/system/kodi-headless.service
[Unit]
Description=Some service
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a kodi-headless
ExecStop=/usr/bin/docker stop -t 2 kodi-headless
[Install]
WantedBy=multi-user.target
EOL
systemctl enable kodi-headless
资料来源:
https://hub.docker.com/r/linuxserver/kodi-headless/
https://libraries.io/github/linuxserver/docker-kodi-headless