我知道在Ubuntu18.04上默认情况下没有安装p7zip包。尽管如此,Nautilus仍然能够创建7z档案。这怎麽可能?
发布于 2018-07-27 17:11:00
Nautilus改变了档案压缩的机制。
ldd $(which nautilus)可执行文件的动态库列表证实了这一点。以下是最重要的一行:
$ ldd /usr/bin/nautilus
...
libarchive.so.13 => /usr/lib/x86_64-linux-gnu/libarchive.so.13
...它的包裹叫什么名字?
$ dpkg -S /usr/lib/x86_64-linux-gnu/libarchive.so.13
libarchive13:amd64: /usr/lib/x86_64-linux-gnu/libarchive.so.13这个包(libarchive13)提供了什么功能?
$ apt-cache show libarchive13
Package: libarchive13
...
Description-en: Multi-format archive and compression library (shared library)
Archive formats supported are:
.
* tar (read and write, including GNU extensions)
...
* zip (read only, with some limitations, uses zlib)
...
* 7zip (read and write, with some limitations)此外,作为进一步的证明--如果我们试图删除这个包,它将从GNOME中删除许多核心应用程序(Nautilus、further、Evince、GNOME控制中心等):
$ sudo apt-get purge libarchive13 --simulate
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
evince* file-roller* fwupd* gir1.2-rb-3.0* gir1.2-totem-1.0*
gir1.2-totemplparser-1.0* gnome-control-center* gnome-software*
gnome-software-plugin-snap* grilo-plugins-0.3-base* gvfs-backends*
libappstream-glib8* libarchive13* libevdocument3-4* libevview3-3*
libgnome-autoar-0-0* libgrilo-0.3-0* libgxps2* librhythmbox-core10*
libtotem-plparser18* libtotem0* nautilus* rhythmbox*
rhythmbox-plugin-alternative-toolbar* rhythmbox-plugins* totem*
totem-plugins* ubuntu-desktop* ubuntu-software*
0 upgraded, 0 newly installed, 29 to remove and 53 not upgraded.所以答案是:Nautilus3.26在Ubuntu18.04LTS中不使用p7zip,它使用来自libarchive13包的函数。
https://askubuntu.com/questions/1060082
复制相似问题