Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Termux #119

Open
CodeIter opened this issue Jan 24, 2024 · 3 comments
Open

Unable to install on Termux #119

CodeIter opened this issue Jan 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@CodeIter
Copy link

Hello, I hope you're doing well.

I encountered an issue while trying to install ssh3 on Termux(aarch64) using the provided installation command(go install github.com/francoismichel/ssh3/cmd/...@latest), the installation fails with the following error:

fatal error: 'shadow.h' file not found

Complete Output on Termux

go: downloading github.com/francoismichel/ssh3 v0.1.6
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/quic-go/quic-go v0.40.1-0.20240102075208-1083d1fb8f98
go: downloading github.com/rs/zerolog v1.31.0
go: downloading golang.org/x/crypto v0.17.0
go: downloading github.com/caddyserver/certmagic v0.20.0
go: downloading github.com/creack/pty v1.1.18
go: downloading go.uber.org/zap v1.24.0
go: downloading github.com/coreos/go-oidc/v3 v3.7.0
go: downloading golang.org/x/oauth2 v0.13.0
go: downloading golang.org/x/term v0.15.0
go: downloading github.com/golang-jwt/jwt/v5 v5.0.0
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading github.com/klauspost/cpuid/v2 v2.2.5
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.2.0
go: downloading github.com/miekg/dns v1.1.55
go: downloading github.com/zeebo/blake3 v0.2.3
go: downloading golang.org/x/net v0.17.0
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading golang.org/x/sys v0.15.0
go: downloading go.uber.org/atomic v1.11.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading github.com/go-jose/go-jose/v3 v3.0.1
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading golang.org/x/text v0.14.0
# github.com/francoismichel/ssh3/util/unix_util
../../go/pkg/mod/github.com/francoismichel/[email protected]/util/unix_util/linux_user.go:11:10: fatal error: 'shadow.h' file not found
   11 | #include <shadow.h>
      |          ^~~~~~~~~~
1 error generated.

Attempted to resolve the issue by creating a proot-distro Alpine Linux environment using:

proot-distro install --override-alias alpine1 alpine
proot-distro login alpine1 --isolated

But, The installation still fails with the following error:

undefined: userPasswordAuthentication
undefined: passwordAuthAvailable
Complete Output on Termux using proot-distro command

go: downloading github.com/francoismichel/ssh3 v0.1.6
go: downloading github.com/creack/pty v1.1.18
go: downloading github.com/quic-go/quic-go v0.40.1-0.20240102075208-1083d1fb8f98
go: downloading github.com/rs/zerolog v1.31.0
go: downloading github.com/caddyserver/certmagic v0.20.0
go: downloading go.uber.org/zap v1.24.0
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading golang.org/x/crypto v0.17.0
go: downloading github.com/golang-jwt/jwt/v5 v5.0.0
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading github.com/klauspost/cpuid/v2 v2.2.5
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.2.0
go: downloading github.com/miekg/dns v1.1.55
go: downloading github.com/zeebo/blake3 v0.2.3
go: downloading golang.org/x/net v0.17.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/coreos/go-oidc/v3 v3.7.0
go: downloading golang.org/x/oauth2 v0.13.0
go: downloading golang.org/x/term v0.15.0
go: downloading go.uber.org/atomic v1.11.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading golang.org/x/sys v0.15.0
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading github.com/go-jose/go-jose/v3 v3.0.1
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading golang.org/x/text v0.14.0
# github.com/francoismichel/ssh3/util/unix_util
go/pkg/mod/github.com/francoismichel/[email protected]/util/unix_util/user.go:20:9: undefined: getUser
go/pkg/mod/github.com/francoismichel/[email protected]/util/unix_util/user.go:87:9: undefined: userPasswordAuthentication
go/pkg/mod/github.com/francoismichel/[email protected]/util/unix_util/user.go:91:9: undefined: passwordAuthAvailable
localhost:~# echo error $?
error 1

@CodeIter
Copy link
Author

I tried again with https://github.com/Questandachievement7Developer/UnifiedContainer , but it falls, this time at github.com/quic-go/quic-go mod with error package net/netip is not in GOROOT .

Script to Reproduce:

git clone --depth=1 https://github.com/Questandachievement7Developer/UnifiedContainer ~/UnifiedContainer.git
cd ~/UnifiedContainer.git/
bash build.sh
cd build/
./UnifiedContainer_*
./unifyServer add container1
./unifyServer launch container1
./unifyServer exec container1 'apk add go ; go install github.com/francoismichel/ssh3/cmd/...@latest || echo error $? ; go version ; uname -a '
complete output

(1/2) Installing binutils-gold (2.37-r3)
(2/2) Installing go (1.17.10-r0)
Executing busybox-1.34.1-r7.trigger
OK: 645 MiB in 69 packages
go: downloading github.com/francoismichel/ssh3 v0.1.6
go: downloading github.com/creack/pty v1.1.18
go: downloading github.com/caddyserver/certmagic v0.20.0
go: downloading github.com/quic-go/quic-go v0.40.1-0.20240102075208-1083d1fb8f98
go: downloading github.com/rs/zerolog v1.31.0
go: downloading go.uber.org/zap v1.24.0
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading golang.org/x/crypto v0.17.0
go: downloading github.com/golang-jwt/jwt/v5 v5.0.0
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading github.com/klauspost/cpuid/v2 v2.2.5
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.2.0
go: downloading github.com/miekg/dns v1.1.55
go: downloading github.com/zeebo/blake3 v0.2.3
go: downloading golang.org/x/net v0.17.0
go: downloading github.com/coreos/go-oidc/v3 v3.7.0
go: downloading golang.org/x/oauth2 v0.13.0
go: downloading golang.org/x/term v0.15.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading go.uber.org/atomic v1.11.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading golang.org/x/sys v0.15.0
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading github.com/go-jose/go-jose/v3 v3.0.1
go: downloading golang.org/x/text v0.14.0
go/pkg/mod/github.com/quic-go/[email protected]/sys_conn_helper_linu
x.go:8:2: package net/netip is not in GOROOT (/usr/lib/go/src/net/netip)
error 1
go version go1.17.10 linux/arm64
Linux localhost UnifiedContainer-IsolationKernelLauncher-rev30 #1 SMP PREEMPT Tue Sep 26 09:13:5
8 UTC 2023 aarch64 Linux

@francoismichel francoismichel added the bug Something isn't working label Jan 25, 2024
@francoismichel
Copy link
Owner

Hi !

Thank for all the debug infos.

I see two errors there:

  1. There is no shadow passwords in Termux, it thus won't be able compile the server if built with password auth. Either you just need the client and it should therefore work with the following command: go install github.com/francoismichel/ssh3/cmd/ssh3@latest. If you need the server, you can compile it by setting the disable_password_auth build tag when building/installing (-tags disable_password_auth)

  2. On your second try, it shows the go version is 1.17. quic-go and therefore this project require go version 1.21 or newer for compiling.

Does it help ?

@CodeIter
Copy link
Author

Yes, thank you. I just need the client on Termux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants