caddyserver / forwardproxy

Forward proxy plugin for the Caddy web server
Apache License 2.0
582 stars 218 forks source link

xcaddy build --with github.com/caddyserver/forwardproxy failed with [FATAL] exit status 1 #135

Closed halifir closed 3 weeks ago

halifir commented 3 weeks ago
  1. Is bug reproducible with latest forwardproxy build? yes

  2. What are you trying to do? build as documented - should I have something to do before using the build command? maybe.

xcaddy build --with github.com/caddyserver/forwardproxy

  1. What did you expect to see? status 0 after build

  2. What did you see instead (give full error messages and/or log)? xcaddy build --with github.com/caddyserver/forwardproxy 2024/06/11 14:31:31 [INFO] absolute output file path: /root/caddy 2024/06/11 14:31:31 [INFO] Temporary folder: /tmp/buildenv_2024-06-11-1431.2867752398 2024/06/11 14:31:31 [INFO] Writing main module: /tmp/buildenv_2024-06-11-1431.2867752398/main.go package main

import ( caddycmd "github.com/caddyserver/caddy/v2/cmd"

    // plug in Caddy modules here
    _ "github.com/caddyserver/caddy/v2/modules/standard"
    _ "github.com/caddyserver/forwardproxy"

)

func main() { caddycmd.Main() } 2024/06/11 14:31:31 [INFO] Initializing Go module 2024/06/11 14:31:31 [INFO] exec (timeout=0s): /usr/bin/go mod init caddy go: creating new go.mod: module caddy go: to add module requirements and sums: go mod tidy 2024/06/11 14:31:31 [INFO] Pinning versions 2024/06/11 14:31:31 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2 github.com/caddyserver/caddy/v2 imports log/slog: package log/slog is not in GOROOT (/usr/lib/go-1.18/src/log/slog) github.com/caddyserver/caddy/v2 imports github.com/quic-go/quic-go imports github.com/quic-go/quic-go/internal/wire imports slices: package slices is not in GOROOT (/usr/lib/go-1.18/src/slices) 2024/06/11 14:31:33 [FATAL] exit status 1

mholt commented 3 weeks ago

Go 1.18 is not supported, it is quite old. Please upgrade to 1.22.

halifir commented 3 weeks ago

found that there is no prerequsites checker and that apt-install go installs a go version but maybe not the right one. there is no newer go available with apt-get install go go 1.18 is from 2022. thats very new for my Linux and me, too. some say that a child from 2022 is quite old, some may say that the children is to young for the school.

I have no idea to upgrade go. case can be closed

thx for the information