我正在尝试编译HTK 库,但遇到问题:
$ make all
(cd HTKLib && make HTKLib.a) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/<path_removed_for_privacy>/htk/HTKLib'
gcc -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I. -DPHNALG -UPHNALG -c -o HGraf.null.o HGraf.null.c
In file included from HShell.h:40,
from HGraf.null.c:25:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
27 | #include <bits/libc-header-start.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
跑步dpkg -S libc-header-start.h
告诉我:
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
好的。/usr/include/bits
应该是的符号链接/usr/include/x86_64-linux-gnu/bits
,但运行后dpkg -S /usr/include/bits
我得到:
dpkg-query: no path found matching pattern /usr/include/bits
我研究过这个错误,据我所知,我应该安装gcc-multilib
来解决它。但我也遇到了这个问题:
The following packages have unmet dependencies:
gcc-multilib : Depends: gcc-9-multilib (>= 9.3.0-3~) but it is not going to be installed
尝试安装gcc-9-multilib
会导致越来越多的依赖问题。研究这个问题后,我发现这主题,他们解决了 gcc-multilib 问题,但不幸的是它对我不起作用。我遇到了与原始帖子中相同的依赖性问题。他们的解决方案是降级libc6-dev
正在运行的“ sudo apt install libc6-dev=2.31-0ubuntu9.2
”。当我这样做时,它显示:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6-dev is already the newest version (2.31-0ubuntu9.2).
libc6-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
因此我已经有了解决他们的问题的版本,但我的问题仍然存在。
关于如何解决此问题的任何建议,以及最重要的是让 HTK 库运行的建议,都将不胜感激。
编辑:
正如评论中所要求的apt policy gcc gcc-multilib gcc-9-multilib
::
gcc:
Installed: 4:9.3.0-1ubuntu2
Candidate: 4:9.3.0-1ubuntu2
Version table:
*** 4:9.3.0-1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
gcc-multilib:
Installed: (none)
Candidate: 4:9.3.0-1ubuntu2
Version table:
4:9.3.0-1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
gcc-9-multilib:
Installed: (none)
Candidate: 9.3.0-17ubuntu1~20.04
Version table:
9.3.0-17ubuntu1~20.04 500
500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
9.3.0-10ubuntu2 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
答案1
我遇到了这个并且它有效
https://wiki.crowncloud.net/?How_to_Install_GCC_on_Debian_11
安装 gcc 后,转到终端并输入
gcc 文件名.c ./a.out