尝试安装 graphviz 库并看到以下内容:
mtaylor@galaxy:~/tmp/apt-strace-output$ sudo apt install -y graphviz
Reading package lists... Done
Building dependency tree
Reading state information... Done
graphviz is already the newest version (2.40.1-2).
The following packages were automatically installed and are no longer required:
acl colord-data emboss-data libcolorhug2 libexif12 libgphoto2-l10n libgphoto2-port12 libgusb2
libhpdf-2.3.0 libieee1284-3 libsane-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libgvc6 (2.40.1-2) ...
Error: /usr/lib/x86_64-linux-gnu/graphviz/config6a is zero sized, or other read error.
Warning: Could not load "/usr/lib/x86_64-linux-gnu/graphviz/libgvplugin_pango.so.6" - file not found
Segmentation fault (core dumped)
dpkg: error processing package libgvc6 (--configure):
installed libgvc6 package post-installation script subprocess returned error exit status 139
dpkg: dependency problems prevent configuration of graphviz:
graphviz depends on libgvc6; however:
Package libgvc6 is not configured yet.
dpkg: error processing package graphviz (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Errors were encountered while processing:
libgvc6
graphviz
E: Sub-process /usr/bin/dpkg returned an error code (1)
config6a 确实是位于 /usr/lib/x86_64-linux-gnu/graphviz 的一个 0 字节长的文件。我不知道该文件有什么用处或相关性。
使用重新运行上述操作 sudo strace -o 输出文件.txt -ff -s 80 apt install graphviz 输出父进程和 41 个子进程的一个输出文件。其中一个子进程执行execve(“/usr/sbin/libgvc6-config-update”)并最终导致段错误。该文件的最后 18 行内容如下:
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libdatrie.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\20\0\0\0\0\0\0@\0\0\0\0\0\0\0000a\0\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0\32\0\31\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=26544, ...}) = 0
mmap(NULL, 2121744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f9676801000
mprotect(0x7f9676807000, 2093056, PROT_NONE) = 0
mmap(0x7f9676a06000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x5000) = 0x7f9676a06000
close(4) = 0
mprotect(0x7f9676a06000, 4096, PROT_READ) = 0
mprotect(0x7f9676c32000, 8192, PROT_READ) = 0
mprotect(0x7f9676e3c000, 4096, PROT_READ) = 0
mprotect(0x7f96770da000, 4096, PROT_READ) = 0
mprotect(0x7f9677325000, 12288, PROT_READ) = 0
mprotect(0x7f967753d000, 4096, PROT_READ) = 0
mprotect(0x7f9677c53000, 4096, PROT_READ) = 0
mprotect(0x7f9677e5d000, 4096, PROT_READ) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xaf26} ---
+++ killed by SIGSEGV (core dumped) +++
我有读一般情况下,人们不希望有 /etc/ld.so.nohwcap 文件。我很想知道下一步该如何修复这个问题!
提前致谢,
马歇尔
System configuration
Arch: AMD 64
OS: Ubuntu 18.04.4 LTS
Kernel: 4.15.0-111-generic #112-Ubuntu SMP (x86_64)
答案1
重新安装包含libgvplugin_pango.so.6和图形可视化包装
sudo rm /usr/lib/x86_64-linux-gnu/graphviz/config6a
sudo apt-get install --reinstall libgvc6 graphviz