Closed arozehnal closed 1 year ago
please try go1.17,1.20 changed something
I've tested the commands below, and they worked.
# ------------------- install golang -----------------
# download Go from https://go.dev/dl
wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz
tar -zxf go1.20.4.linux-amd64.tar.gz -C $HOME/
# or
# echo "export PATH=$PATH:$HOME/go/bin" >> ~/.bashrc
# source ~/.bashrc
export PATH=$PATH:$HOME/go/bin
# --------------- the development version --------------
git clone https://github.com/shenwei356/csvtk
cd csvtk/csvtk/
# you may use another goproxy setting for some regions.
export GOPROXY=https://goproxy.cn,direct
go build
# The executable binary file is located in:
# ./csvtk
# You can also move it to anywhere in the $PATH
mkdir -p $HOME/bin
cp ./csvtk $HOME/bin/
OK, thanks for the advice, but AIX is one big problem, What works on Linux may not work on AIX. go 1.18 ends with another error
github.com/cheggaaa/pb/v3/termutil ../../go/pkg/mod/github.com/cheggaaa/pb/v3@v3.1.0/termutil/term.go:34:11: undefined: lockEcho ../../go/pkg/mod/github.com/cheggaaa/pb/v3@v3.1.0/termutil/term.go:50:11: undefined: unlockEcho ../../go/pkg/mod/github.com/cheggaaa/pb/v3@v3.1.0/termutil/term.go:61:22: undefined: unlockSignals
It looks like the process bar package has some compatibility with AIX.
You can also try some alternatives:
I am sorry. I am newbie to Go, I would like to build csvtk for AIX.
go get -u github.com/shenwei356/csvtk/csvtk go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
AIX 7.2 go version go1.20.2 aix/ppc64