GCC can't find stdio.h in Alpine Linux

只谈情不闲聊 提交于 2019-12-03 10:33:44
Franklin Yu

Install libc-dev in addition to GCC, or just install build-base for everything (alpine-sdk is probably an overkill). To install run the following command:

apk add libc-dev

You need to install it separately because in Alpine Linux, the package GCC doesn't depend on libc-dev for good reason:

You can use gcc to compile things without libc, for example hypervisors firmware etc.

And August Klein also noted that in Debian, GCC only recommends libc-dev for the same reason (but most people don't do --no-install-recommends anyway).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!