Google-Cloud-Platform
gcsfuse 無法在 centos-7 上安裝
自 4 月 1 日星期四以來,我們在每天從基本 centos-7 映像啟動的 GCP comoute 虛擬機上遇到問題。
啟動時,啟動腳本將使用此處列出的命令安裝 gcsFuse: https ://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/installing.md#centos-and-red-hat-latest-releases
自最新版本以來,此安裝方法現在失敗:
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 8.6 kB 00:00:00 * base: mirror.atl.genesisadaptive.com * epel: iad.mirror.rackspace.com * extras: mirrors.mit.edu * updates: mirrors.raystedman.org base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 gcsfuse/signature | 844 B 00:00:00 Retrieving key from https://packages.cloud.google.com/yum/doc/yum-key.gpg Retrieving key from https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg gcsfuse/signature | 1.4 kB 00:00:00 !!! https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for gcsfuse Trying other mirror.
有誰知道如何解決這個錯誤?
有一個快速的解決方法,但這意味著跳過 GPG 儲存庫密鑰驗證。我只是改變
repo_gpgcheck=1
並repo_gpgcheck=0
保持原樣。最終腳本如下所示:
sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null <<EOF [gcsfuse] name=gcsfuse (packages.cloud.google.com) baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=0 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF
結果是這樣的:
[wb@instance-1 yum.repos.d]$ sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null <<EOF > [gcsfuse] > name=gcsfuse (packages.cloud.google.com) > baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64 > enabled=1 > gpgcheck=1 > repo_gpgcheck=0 > gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg > https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg > EOF [wb@instance-1 yum.repos.d]$ sudo yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: atl.mirrors.clouvider.net * epel: mirror.steadfastnet.com * extras: centos.mirrors.hoobly.com * updates: mirror.genesisadaptive.com gcsfuse | 1.4 kB 00:00:00 gcsfuse/primary | 2.5 kB 00:00:00 gcsfuse 16/16 No packages marked for update [wb@instance-1 yum.repos.d]$ sudo yum install gcsfuse -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: atl.mirrors.clouvider.net * epel: mirror.steadfastnet.com * extras: centos.mirrors.hoobly.com * updates: mirror.genesisadaptive.com Resolving Dependencies --> Running transaction check ---> Package gcsfuse.x86_64 0:0.28.1-1 will be installed --> Processing Dependency: fuse for package: gcsfuse-0.28.1-1.x86_64 --> Running transaction check ---> Package fuse.x86_64 0:2.9.2-11.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================ Package Arch Version Repository Size ================================================================================================================ Installing: gcsfuse x86_64 0.28.1-1 gcsfuse 4.0 M Installing for dependencies: fuse x86_64 2.9.2-11.el7 base 86 k Transaction Summary ================================================================================================================ Install 1 Package (+1 Dependent package) Total download size: 4.1 M Installed size: 12 M Downloading packages: (1/2): fuse-2.9.2-11.el7.x86_64.rpm | 86 kB 00:00:00 (2/2): 4d9c7e630b6a8c14c6c054f5c23107be50e8d8a3b2707e6bef66ef6a236bb5c4-gcsfuse-0.28.1-1 | 4.0 MB 00:00:00 ---------------------------------------------------------------------------------------------------------------- Total 7.4 MB/s | 4.1 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : fuse-2.9.2-11.el7.x86_64 1/2 Installing : gcsfuse-0.28.1-1.x86_64 2/2 Verifying : gcsfuse-0.28.1-1.x86_64 1/2 Verifying : fuse-2.9.2-11.el7.x86_64 2/2 Installed: gcsfuse.x86_64 0:0.28.1-1 Dependency Installed: fuse.x86_64 0:2.9.2-11.el7 Complete!
我剛剛在具有預設設置的 CentOS 7 的新虛擬機上對其進行了測試。我還將它用作啟動腳本,它按預期工作。
這裡討論了類似的問題,但這種方法對我不起作用。