在 Ubuntu 20.04 中编译 KTechlab

在 Ubuntu 20.04 中编译 KTechlab

我找不到 KTechlab 的软件包。我决定从源代码编译它,但我遇到了一个似乎无法解决的问题。https://github.com/ktechlab/ktechlab-0.3

$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake-qt4 (found suitable version "4.8.7", minimum required is "4.6.0") 
CMake Error at /usr/share/cmake-3.16/Modules/FindKDE4.cmake:61 (message):
  ERROR: Could not find KDE4 kde4-config
Call Stack (most recent call first):
  CMakeLists.txt:11 (find_package)

我搜索过但无法安装 kdelibs4...

这是我的配置:

  • Ubuntu 20.04
  • 我安装了 Kde 桌面:sudo apt-get install kubuntu-desktop

你能帮助我吗?

谢谢。

答案1

请注意,ktechlab-0.3 是一个非常旧的分支,它依赖于 Qt4,而 Qt4 无法通过官方存储库提供给 Ubuntu 20.04 LTS。

但是你可以使用备用存储库 - KDE Trinity R14 进行安装:

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/j/jasper/libjasper1_1.900.1-debian1-2.4ubuntu1.2_amd64.deb
sudo apt-get install ./libjasper1_1.900.1-debian1-2.4ubuntu1.2_amd64.deb

sudo add-apt-repository "deb https://ftp.fau.de/trinity/trinity-r14.0.0/ubuntu/ focal main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C93AF1698685AD8B
sudo apt-get update
sudo apt install ktechlab-trinity

这将以安装 KTechlab 0.3 结束,正如您在问题中所要求的那样。您可以使用命令行进行安装/opt/trinity/bin/ktechlab,您将获得以下内容:

KDE Trinity R14 中的 KTechLab 0.3


我建议切换到现代 0.50.1 版本并通过翻译进行编译ArchLinux AUR PKGBUILD修改为 deb-package 名称如下:

sudo apt install build-essential git cmake gfortran fftw3-dev qtbase5-dev qttools5-dev libqt5serialport5-dev qtmultimedia5-dev libqt5multimedia5-plugins libqt5sql5-sqlite autoconf automake libtool texinfo libusb-1.0-0-dev libudev-dev

cd ~/Downloads
git clone https://github.com/ktechlab/ktechlab.git
cd ktechlab
sh build-simple.sh
sh run-simple.sh

您将获得以下内容:

从源代码编译的 KTechLab 0.50.1

注意:ktechlab软件包现已适用于 21.04 版本宇宙口袋,因此安装非常简单sudo add-apt-repository universe && sudo apt-get install ktechlab

相关内容