麒麟V4桌面版上安装qtwebsockets,遇到一系列报错解决方案

参考麒麟V10上编译qtwebsockets时报错文章,基于该文章中的经验,首先安装基础依赖。

0. 系统信息

WARNING! The remote SSH server rejected X11 forwarding request.
Welcome to Kylin 4.0.2 (GNU/Linux 4.4.0-21-generic x86_64)
Last login: Fri Jul 14 10:40:59 2023 from 192.168.64.1
root@xingwei-virtual-machine:~# cat /etc/os-release 
NAME="Kylin"
VERSION="4.0.2 (juniper)"
ID=kylin
ID_LIKE=debian
PRETTY_NAME="Kylin 4.0.2"
VERSION_ID="4.0.2"
HOME_URL="http://www.kylinos.cn/"
SUPPORT_URL="http://www.kylinos.cn/content/service/service.html"
BUG_REPORT_URL="http://www.kylinos.cn/"
UBUNTU_CODENAME=juniper
root@xingwei-virtual-machine:~# arch
x86_64

麒麟V4自带了Qt,版本是Qt5.5.1。

麒麟V4桌面版上安装qtwebsockets,遇到一系列报错解决方案_第1张图片

1. qtbase5-dev、qtbase5-private-dev 依赖

root@xingwei-virtual-machine:~# apt-get install qtbase5-private-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qtbase5-private-dev : Depends: qtbase5-dev (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@xingwei-virtual-machine:~# 
root@xingwei-virtual-machine:~# 
root@xingwei-virtual-machine:~# 

root@xingwei-virtual-machine:~# apt install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libhpmud0 : Depends: libsnmp30 (>= 5.7.3+dfsg-1.8ubuntu3~dfsg) but 5.7.3+dfsg-1kord4 is to be installed
 libio-socket-ssl-perl : Depends: libnet-ssleay-perl (>= 1.59) but it is not going to be installed
 libxml-twig-perl : Depends: libxml-parser-perl but it is not going to be installed
                    Recommends: libtie-ixhash-perl but it is not going to be installed
                    Recommends: libxml-xpathengine-perl but it is not going to be installed or
                                libxml-xpath-perl but it is not going to be installed
                    Recommends: libwww-perl but it is not going to be installed
                    Recommends: libhtml-parser-perl but it is not going to be installed
 perl-base : Breaks: perl (< 5.26.1~) but 5.22.1-9kord is to be installed
 qtbase5-dev : Depends: libgl1-mesa-dev but it is not going to be installed or
                        libgl-dev
               Depends: libgles2-mesa-dev but it is not going to be installed or
                        libgles2-dev but it is not installable
               Depends: libglu1-mesa-dev but it is not going to be installed or
                        libglu-dev
               Depends: libqt5gui5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Depends: libqt5printsupport5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Depends: libqt5widgets5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Recommends: libqt5opengl5-dev (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

不要慌,,按照报错依次安装依赖。。
apt install libsnmp30,待其安装完毕之后,继续执行
apt-get install qtbase5-dev,此时显示的依赖明显少了。。

root@xingwei-virtual-machine:~# apt-get install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qtbase5-dev : Depends: libgl1-mesa-dev but it is not going to be installed or
                        libgl-dev
               Depends: libgles2-mesa-dev but it is not going to be installed or
                        libgles2-dev but it is not installable
               Depends: libglu1-mesa-dev but it is not going to be installed or
                        libglu-dev
               Depends: libqt5gui5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Depends: libqt5printsupport5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Depends: libqt5widgets5 (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
               Recommends: libqt5opengl5-dev (= 5.9.5+dfsg-0ubuntu2.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

继续执行apt-get install libgl1-mesa-dev,待其安装完毕之后在,再次尝试执行apt-get install qtbase5-dev,发现其已经被安装完了。。

oot@xingwei-virtual-machine:~# apt-get install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
qtbase5-dev is already the newest version (5.9.5+dfsg-0ubuntu2.6).
The following packages were automatically installed and are no longer required:
  libbotan-1.10-1 libbrotli1 libclang1-3.6 libllvm3.6v5 libmirclient-dev libmircommon-dev libmircookie-dev libmircookie2 libobjc-5-dev libobjc4 libprotobuf-dev libqbscore1
  libqbsqtprofilesetup1 libqt5clucene5 libqt5opengl5 libqt5positioning5 libqt5sensors5 libqt5webchannel5 libqt5webkit5 libwebp6 libwoff1 libxkbcommon-dev x11proto-dri2-dev
  x11proto-gl-dev
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1192 not upgraded.

接下来更新一下,,,apt-get update。
最后 apt-get install qtbase5-private-dev。
ok,此时private就算搞定了。。。

麒麟V4桌面版上安装qtwebsockets,遇到一系列报错解决方案_第2张图片

2. 后续过程

和**麒麟V10上编译qtwebsockets时报错中的情形差不多,参考即可。。。**
此处不再赘述。

你可能感兴趣的:(#,QT开发经验,qt,麒麟V4)