Fatal error : on running go vet cmd

111 views
Skip to first unread message

Tejas Gowda

unread,
Jan 12, 2022, 1:58:34 PM1/12/22
to golang-nuts
# runtime/cgo
_cgo_export.c:3:20: fatal error: stdlib.h: No such file or directory
 #include <stdlib.h>
                    ^
compilation terminated.

Ian Lance Taylor

unread,
Jan 12, 2022, 3:59:00 PM1/12/22
to Tejas Gowda, golang-nuts
That looks like you have a C compiler installed but no C library installed.

Hard to say more without more information, like what kind of system
you are using and exactly what you did.

Ian

Tejas Gowda

unread,
Jan 12, 2022, 4:17:48 PM1/12/22
to golang-nuts
I am using linux enviorment, installed go 1.6

Ian Lance Taylor

unread,
Jan 12, 2022, 4:19:14 PM1/12/22
to Tejas Gowda, golang-nuts
On Wed, Jan 12, 2022 at 1:17 PM Tejas Gowda <tejas7...@gmail.com> wrote:
>
> I am using linux enviorment, installed go 1.6

1.16 rather than 1.6, I hope.

What Linux distro?

Ian
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1ce9b7e4-e4d7-4340-a13f-d9c58e3c431cn%40googlegroups.com.

Roland Müller

unread,
Jan 14, 2022, 1:42:54 AM1/14/22
to Ian Lance Taylor, Tejas Gowda, golang-nuts
Hello


Am Mi., 12. Jan. 2022 um 23:19 Uhr schrieb Ian Lance Taylor <ia...@golang.org>:
On Wed, Jan 12, 2022 at 1:17 PM Tejas Gowda <tejas7...@gmail.com> wrote:
>
> I am using linux enviorment, installed go 1.6

In Fedora 34 there must be glibc-headers-x86 installed to get C headers. However, if gcc is installed by package management (rpm or dnf in Fedora case) then this package will be installed thru the dependencies.

$ rpm -qf /usr/include/stdlib.h
glibc-headers-x86-2.33-20.fc34.noarch 

BR,
Roland


1.16 rather than 1.6, I hope.

What Linux distro?

Ian

> On Thursday, January 13, 2022 at 2:29:00 AM UTC+5:30 Ian Lance Taylor wrote:
>>
>> On Wed, Jan 12, 2022 at 10:58 AM Tejas Gowda <tejas7...@gmail.com> wrote:
>> >
>> > # runtime/cgo
>> > _cgo_export.c:3:20: fatal error: stdlib.h: No such file or directory
>> > #include <stdlib.h>
>> > ^
>> > compilation terminated.
>>
>> That looks like you have a C compiler installed but no C library installed.
>>
>> Hard to say more without more information, like what kind of system
>> you are using and exactly what you did.
>>
>> Ian
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1ce9b7e4-e4d7-4340-a13f-d9c58e3c431cn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages