问题
最近在Ubuntu20.04上安装新版本的Synergy遇到一些问题,Synergy最后一个支持ubuntu20.04的版本是v3.1.3-beta,下面是下载地址:
https://symless.com/synergy/download/other
在安装的时候遇到下面的问题:
提示依赖libssl1,然后尝试安装下面的软件包:
sudo apt install libssl-dev libssl1.1
结果还是提示相同的错误。
使用pkc-config看到系统中并没有libssl1:
pengdl@ubuntu:~$ pkg-config --list-all
...
libssl OpenSSL-libssl - Secure Sockets Layer and cryptography libraries
解决
- 解压deb包,查看当前系统是否满足synergy的库运行依赖
pengdl@ubuntu:~/synergy$ ar -x ../synergy-linux_x64-libssl1-v3.1.3-beta.deb
pengdl@ubuntu:~/synergy$ ls
control.tar.gz data.tar.bz2 debian-binarypengdl@ubuntu:~/synergy$ mkdir control
pengdl@ubuntu:~/synergy$ tar -xf control.tar.gz -C control
pengdl@ubuntu:~/synergy$ mkdir data
pengdl@ubuntu:~/synergy$ tar -xf data.tar.bz2 -C data/
- 在control/control中会列出这个deb包的依赖关系
pengdl@ubuntu:~/synergy$ cat control/control
Package: synergy
Version: 3.1.3~beta
License: unknown
Vendor: Symless <support@symless.com>
Architecture: amd64
Maintainer: Symless <support@symless.com>
Installed-Size: 389135
Depends: libnotify4, libxtst6, libnss3, libappindicator3-1, libqt5dbus5, libssl1
Recommends: libappindicator3-1
Section: default
Priority: optional
Homepage: https://symless.com/synergy
Description:Use the keyboard, mouse, or trackpad of one computer to control nearby computers.
- 查看具体可执行程序的库依赖
pengdl@ubuntu:~/synergy/data/opt/Synergy$ ldd ./synergy* | grep libssllibssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f4a60e12000)libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f2c63f1b000)
可以看到,当前系统提供的libssl也可以满足需求。
所以,可以尝试修改一下deb包的依赖,然后重新打包安装。
- 修改库依赖
对control的内容做如下修改:
Depends: libnotify4, libxtst6, libnss3, libappindicator3-1, libqt5dbus5
即:删除对libssl1库的依赖
- 重新打包
pengdl@ubuntu:~/synergy/control$ ls
control md5sums postinst postrm prerm
pengdl@ubuntu:~/synergy/control$ tar -czf control.tar.gz *
pengdl@ubuntu:~/synergy/control$ mv control.tar.gz ..pengdl@ubuntu:~/synergy$ ar rcs new_synergy-linux_x64-v3.1.3-beta.deb debian-binary control.tar.gz data.tar.bz2
pengdl@ubuntu:~/synergy$ ls
control control.tar.gz data data.tar.bz2 debian-binary new_synergy-linux_x64-v3.1.3-beta.deb
重新打包后得到:new_synergy-linux_x64-libssl-v3.1.3-beta.deb
- 再次安装
pengdl@ubuntu:~/synergy$ sudo apt install ./new_synergy-linux_x64-v3.1.3-beta.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'synergy' instead of './new_synergy-linux_x64-v3.1.3-beta.deb'
The following additional packages will be installed:libdouble-conversion3 libpcre2-16-0 libqt5core5a libqt5dbus5 qttranslations5-l10n
The following NEW packages will be installed:libdouble-conversion3 libpcre2-16-0 libqt5core5a libqt5dbus5 qttranslations5-l10n synergy
0 upgraded, 6 newly installed, 0 to remove and 463 not upgraded.
Need to get 3,919 kB/128 MB of archives.
After this operation, 418 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.aliyun.com/ubuntu focal/universe amd64 libdouble-conversion3 amd64 3.1.5-4ubuntu1 [37.9 kB]
Get:2 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 libpcre2-16-0 amd64 10.34-7ubuntu0.1 [181 kB]
Get:3 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5core5a amd64 5.12.8+dfsg-0ubuntu2.1 [2,006 kB]
Get:4 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5dbus5 amd64 5.12.8+dfsg-0ubuntu2.1 [208 kB]
Get:5 http://mirrors.aliyun.com/ubuntu focal/universe amd64 qttranslations5-l10n all 5.12.8-0ubuntu1 [1,486 kB]
Get:6 /home/pengdl/synergy/new_synergy-linux_x64-v3.1.3-beta.deb synergy amd64 3.1.3~beta [124 MB]
Fetched 3,919 kB in 1s (5,434 kB/s)
Selecting previously unselected package libdouble-conversion3:amd64.
(Reading database ... 159549 files and directories currently installed.)
Preparing to unpack .../0-libdouble-conversion3_3.1.5-4ubuntu1_amd64.deb ...
Unpacking libdouble-conversion3:amd64 (3.1.5-4ubuntu1) ...
Selecting previously unselected package libpcre2-16-0:amd64.
Preparing to unpack .../1-libpcre2-16-0_10.34-7ubuntu0.1_amd64.deb ...
Unpacking libpcre2-16-0:amd64 (10.34-7ubuntu0.1) ...
Selecting previously unselected package libqt5core5a:amd64.
Preparing to unpack .../2-libqt5core5a_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5core5a:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Selecting previously unselected package libqt5dbus5:amd64.
Preparing to unpack .../3-libqt5dbus5_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5dbus5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Selecting previously unselected package qttranslations5-l10n.
Preparing to unpack .../4-qttranslations5-l10n_5.12.8-0ubuntu1_all.deb ...
Unpacking qttranslations5-l10n (5.12.8-0ubuntu1) ...
Selecting previously unselected package synergy.
Preparing to unpack .../5-new_synergy-linux_x64-v3.1.3-beta.deb ...
Unpacking synergy (3.1.3~beta) ...
Setting up libdouble-conversion3:amd64 (3.1.5-4ubuntu1) ...
Setting up libpcre2-16-0:amd64 (10.34-7ubuntu0.1) ...
Setting up qttranslations5-l10n (5.12.8-0ubuntu1) ...
Setting up libqt5core5a:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5dbus5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up synergy (3.1.3~beta) ...
production build
[env] SYNERGY_LOGGER: not set
[env] SYNERGY_FORCE_CORE_LOG_LEVEL: not set
[env] SYNERGY_FORCE_SERVICE_LOG_LEVEL: not set
using log level: INFO
using logger: /root/.local/state/Synergy/synergy.log
exiting process with code: 0
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
- 测试
启动synergy,可以正常运行。
完。