在 GCloud 中的 Docker 中安装 GCSFuse 失败

问题描述

我正在运行一个直到昨天才有效的命令,并在本地 Docker 上本地运行,以安装 gcsfuse 0.28.1 版: E:未找到“gcsfuse”的“0.28.1”版本

我也在谷歌云控制台上尝试过,在那里得到了同样的错误

有什么建议或指示吗?

这是原始命令: export GCSFUSE_REPO=gcsfuse-lsb_release -c -s
&& echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | tee /etc/apt/sources.list.d/gcsfuse.list
&& 卷曲 ​​https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key 添加 -
&& apt-get update && apt-get install -y gcsfuse=0.28.1 \

解决方法

我不确定这是否是您的格式,但看起来您的命令中缺少 release 变量。请尝试使用以下命令:

export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s` && \
echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | tee /etc/apt/sources.list.d/gcsfuse.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update -y && \
apt-get install -y gcsfuse=0.28.1 -V

如果它不起作用,这里是所有 gcsfuse 版本的存储库:

https://github.com/GoogleCloudPlatform/gcsfuse/releases/tag/v0.28.1

,

我按照此 link 在 Google Cloud Shell 上尝试了以下命令,并且我能够成功安装 GCSFuse。

Add the gcsfuse distribution URL as a package source and import its public key using :

export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

Update the list of packages available and install gcsfuse using :
sudo apt-get update
sudo apt-get install gcsfuse

(Ubuntu before wily only) Add yourself to the fuse group,then log out and back in using :
sudo usermod -a -G fuse $USER
exit

我还在本文档中发现了一行内容,其中说“以下说明设置 apt-get 以查看 gcsfuse 的更新,并且 支持Ubuntu,以及Debian 的jessie 和stretch 版本。 (运行 lsb_release -c 以查找您的版本代号。)旧版本的用户应遵循以下其他发行版的说明。

所以你也应该先尝试找到发布代号。如果您是旧版本的用户,那么这些命令可能不适合您。为此,请按照安装旧发行版的说明/命令进行操作,这在此 document reference

中有明确区分和指定