Goofysのインストールエラー
OS: CentOS8
GO: go version go1.14.12 linux/amd64
goofys: goofys version 0.24.0-use `make build' to fill version hash correctly
Goofysの手順通りインストールするとエラーが起きる
Or build from source with Go 1.10 or later:
$ export GOPATH=$HOME/work
$ go get github.com/kahing/goofys
$ go install github.com/kahing/goofys
エラー内容
# export GOPATH=$HOME/go
# go get github.com/kahing/goofys
# github.com/kahing/goofys/api/common
go/src/github.com/kahing/goofys/api/common/conf_azure.go:272:34: accountsRes.Value undefined (type storage.AccountListResultPage has no field or method Value)
go/src/github.com/kahing/goofys/api/common/conf_azure.go:373:35: not enough arguments in call to client.ListKeys
have (context.Context, string, string)
want (context.Context, string, string, storage.ListKeyExpand)
結論1
- go get でダウンロードのみ(-d)行い
- go installでインストールする
結論2
- バイナリ版を使う(オススメ)
対策
- go get でダウンロードのみ(-d)行う
# go get -d github.com/kahing/goofys
# pwd
/root/go/src/github.com/kahing/goofys
# ll
合計 60
-rw-r--r-- 1 root root 11358 5月 19 09:08 LICENSE
-rw-r--r-- 1 root root 348 5月 19 09:08 Makefile
-rw-r--r-- 1 root root 2433 5月 19 09:08 README-azure.md
-rw-r--r-- 1 root root 5426 5月 19 09:08 README.md
drwxr-xr-x 3 root root 34 5月 19 09:08 api
drwxr-xr-x 4 root root 290 5月 19 09:08 bench
drwxr-xr-x 2 root root 24 5月 19 09:08 doc
drwxr-xr-x 2 root root 25 5月 19 09:08 example
-rw-r--r-- 1 root root 1889 5月 19 09:08 go.mod
-rw-r--r-- 1 root root 14371 5月 19 09:08 go.sum
drwxr-xr-x 2 root root 4096 5月 19 09:08 internal
-rw-r--r-- 1 root root 5542 5月 19 09:08 main.go
drwxr-xr-x 2 root root 72 5月 19 09:08 test
- go install でインストール
# go install github.com/kahing/goofys
go: downloading github.com/urfave/cli v1.21.1-0.20190807111034-521735b7608a
go: downloading github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: downloading golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f
go: downloading github.com/Azure/azure-sdk-for-go v32.1.0+incompatible
go: downloading github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
go: downloading github.com/aws/aws-sdk-go v1.38.7
go: downloading github.com/Azure/azure-pipeline-go v0.2.2
go: downloading github.com/kahing/fusego v0.0.0-20200327063725-ca77844c7bcc
go: downloading github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984
go: downloading github.com/Azure/go-autorest v14.2.0+incompatible
go: downloading github.com/sevlyar/go-daemon v0.1.5
go: downloading github.com/Azure/go-autorest/autorest v0.11.18
go: downloading github.com/Azure/go-autorest/tracing v0.6.0
go: downloading github.com/Azure/go-autorest/autorest/adal v0.9.13
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/form3tech-oss/jwt-go v3.2.2+incompatible
go: downloading github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f
go: downloading golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
go: downloading github.com/Azure/go-autorest/autorest/azure/cli v0.4.2
go: downloading github.com/dimchansky/utfbom v1.1.1
go: downloading github.com/Azure/go-autorest/logger v0.2.1
go: downloading github.com/sirupsen/logrus v1.4.3-0.20190807103436-de736cf91b92
go: downloading github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb
go: downloading gopkg.in/ini.v1 v1.46.0
go: downloading github.com/Azure/go-autorest/autorest/date v0.3.0
go: downloading github.com/Azure/go-autorest/autorest/azure/auth v0.5.7
go: downloading github.com/Azure/azure-storage-blob-go v0.7.1-0.20190724222048-33c102d4ffd2
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/Azure/go-autorest/autorest/validation v0.3.1
go: downloading github.com/Azure/go-autorest/autorest/to v0.4.0
- 確認
# ~/go/bin/goofys --version
goofys version 0.24.0-use `make build' to fill version hash correctly
備考
- インストール前のgo env
# go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build638754538=/tmp/go-build -gno-record-gcc-switches"
- インストール後のgo env
# go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/go/src/github.com/kahing/goofys/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build479313617=/tmp/go-build -gno-record-gcc-switches"
バイナリ版を使う
# dnf -y install epel-release
# dnf -y --enablerepo=epel install fuse
# curl -sS -L -o /usr/local/bin/goofys https://github.com/kahing/goofys/releases/download/v0.24.0/goofys
# chmod +x /usr/local/bin/goofys
# printf "\n/usr/local/bin/goofys#hoge.bucket.com /mnt/disk_s3 fuse _netdev,allow_other,0 0\n" >> /etc/fstab