Looks like golang-1.18-go owns /usr/lib/go-1.18/pkg/include <<'SH_COMMANDS' docker run --rm -i debian:bookworm sh apt update && apt -y install apt-file && apt-file update && apt-file search /usr/lib/go-1.18/pkg/include SH_COMMANDS
On Saturday, April 9, 2022 at 1:33:04 AM UTC-6 Brian Candler wrote: > Are you sure Debian didn't split it into multiple packages, like a > separate "golang-src" package perhaps? > > On Friday, 8 April 2022 at 13:49:28 UTC+1 sunto...@gmail.com wrote: > >> On Fri, Apr 8, 2022 at 2:00 AM Jack Li <ljh...@qq.com> wrote: >> > >> > Yes, I download the latest go 1.18 installer for macOS from >> golang.google.cn. There's no problem with the installer from the >> official site. >> > >> > >> > ------------------ Original ------------------ >> > From: "Ian Lance Taylor"<ia...@golang.org>; >> > Date: 2022年4月8日(星期五) 上午7:40 >> > To: "Tong Sun"<sunto...@gmail.com>; >> > Cc: "golang-nuts"<golan...@googlegroups.com>; >> > Subject: Re: [go-nuts] Missing /usr/lib/go/pkg/include/ for native >> binaries >> > >> > On Thu, Apr 7, 2022 at 2:35 PM Tong Sun <sunto...@gmail.com> wrote: >> > > >> > > This might be the first go package that I do `go get` and which >> requires native binaries: >> > > >> > > $ go get -v go.opentelemetry.io/otel/exporters/stdout/stdouttrace >> > > golang.org/x/sys/unix >> > > # golang.org/x/sys/unix >> > > /.../Go/pkg/mod/ >> golang.org/x/s...@v0.0.0-20210423185535-09eb48e85fd7/unix/asm_linux_amd64.s:9 >> >> <http://golang.org/x/sys@v0.0.0-20210423185535-09eb48e85fd7/unix/asm_linux_amd64.s:9>: >> >> #include: open /usr/lib/go-1.17/pkg/include/textflag.h: no such file or >> directory >> > > >> > > I checked and found that I'm missing the whole >> /usr/lib/go-1.17/pkg/include/ directory. >> > > >> > > How can I get them so that my `go get` can be successful? >> > > >> > > Thanks >> > > >> > > $ go version >> > > go version go1.17.6 linux/amd64 >> > > >> > > $ lsb_release -a >> > > No LSB modules are available. >> > > Distributor ID: Debian >> > > Description: Debian GNU/Linux bullseye/sid >> > > Release: 10.12 >> > > Codename: buster >> > > >> > > $ apt-cache policy golang-1.17-src >> > > golang-1.17-src: >> > > Installed: 1.17.6-1~bpo11+1 >> > > Candidate: 1.17.8-1~bpo11+1 >> > > Version table: >> > > 1.17.8-1~bpo11+1 100 >> > > 100 http://deb.debian.org/debian bullseye-backports/main amd64 >> Packages >> > > *** 1.17.6-1~bpo11+1 100 >> > > 100 /var/lib/dpkg/status >> > >> > That's odd. File a bug report against Debian? I don't know why they >> > are missing. >> > >> > You can of course get the header files you need by installing Go >> > yourself (https://go.dev/doc/install). >> > >> > Ian >> >> Thank you both, >> >> I reported the problem to Debian, as I didn't find the include/ >> directory in either, >> https://packages.debian.org/sid/all/golang-1.17-src/filelist >> https://packages.debian.org/sid/all/golang-1.18-src/filelist >> >> but it turns out to be *my own* problem. I.e., >> >> either the Debian package or the official one are OK. >> >> Thanks again >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a698d9a4-d23c-400b-b3ff-058d4a556c99n%40googlegroups.com.