gcsfuse failing to install on centos-7

Solution 1:

There's a quick workaround but that means skipping GPG repo key verification. I just changed repo_gpgcheck=1 to repo_gpgcheck=0 and left the rest as it is.

Final script would look like:

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

This was the result:

[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!

I tested it just now on a fresh ne VM with CentOS 7 with default settings. I also used it as a startup script and it worked as intended.

Similar issue was discussed here but this approach didn't work for me.