我正在寻找一种方法来安装同一个软件包的两个版本(qt5-default 和 qt5-dev)。我发现了类似的问题这里
其中一个答案是
删除 libfltk1.1-dev,但确保保留 libfltk1.1。
作者:saiarcot895
我不太明白你如何能删除它但又保留它?我猜在那个问题上下文中,应用程序运行时需要 libfltk1.1,而编译需要 libfltk1.1-dev。但如果我执行这样的“sudo apt-get remove libfltk1.1-dev”,它也会删除 libfltk1.1?
答案1
libfltk1.1
不是“一部分” libfltk1.1-dev
,它们是单独的包。
libfltk1.1-dev
依赖于取决于 libfltk1.1
但反之则不然(您可以使用来确认这一点apt depends
),因此您可以删除该-dev
包而不影响运行时包:
$ sudo apt remove libfltk1.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libfltk1.1-dev
0 upgraded, 0 newly installed, 1 to remove and 269 not upgraded.
After this operation, 2,290 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 404888 files and directories currently installed.)
Removing libfltk1.1-dev (1.1.10-23) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
$
$ apt policy libfltk1.1 libfltk1.1-dev
libfltk1.1:
Installed: 1.1.10-23
Candidate: 1.1.10-23
Version table:
*** 1.1.10-23 500
500 http://ca.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
libfltk1.1-dev:
Installed: (none)
Candidate: 1.1.10-23
Version table:
1.1.10-23 500
500 http://ca.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status