收起左侧

飞牛 1.0.0 版本是否维护了独立的 C 库?

0
回复
23
查看
[ 复制链接 ]

1

主题

0

回帖

0

牛值

江湖小虾

悬赏3飞牛币未解决

飞牛 1.0.0 版本,编译一个基本的 C 程序,都找不到 stdio.h

catboy@XXX:~$ gcc all-disks.c 
all-disks.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.

尝试安装 build-essential 包,提示 C 库的依赖不满足。

catboy@XXX:~$ sudo apt install build-essential
[sudo] password for catboy: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
 libstdc++-12-dev : Depends: libc6-dev (>= 2.23-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

安装包 libc6-dev 的话,提示这个库被 held:

catboy@XXX:~$ sudo apt install libc6-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libabsl20220623 libavif15 libc-bin libc-dev-bin libc-devtools libc-l10n libc6 libcrypt-dev libgav1-1 libgd3 libnsl-dev libtirpc-dev libxpm4 linux-libc-dev locales
  manpages-dev rpcsvc-proto
Suggested packages:
  glibc-doc libnss-nis libnss-nisplus libgd-tools
The following NEW packages will be installed:
  libabsl20220623 libavif15 libc-dev-bin libc-devtools libc6-dev libcrypt-dev libgav1-1 libgd3 libnsl-dev libtirpc-dev libxpm4 linux-libc-dev manpages-dev
  rpcsvc-proto
The following held packages will be changed:
  libc6-dev
The following packages will be upgraded:
  libc-bin libc-l10n libc6 locales
4 upgraded, 14 newly installed, 0 to remove and 110 not upgraded.
Need to get 15.6 MB of archives.
After this operation, 28.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]

请问飞牛的技术人员:

  1. 飞牛是否维护了自己的 glibc,或是内核固定了某一版本的 glibc?
  2. 我能否安全地安装 libc6-dev?该操作是否会破坏飞牛的组件依赖?
  3. 如果不能自行安装,飞牛是否提供交叉编译工具链?亦或是其他的 C 开发途径?
收藏
送赞
分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则