Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing sshfs fails on CentOS #342

Closed
afbjorklund opened this issue Oct 18, 2021 · 7 comments · Fixed by #344
Closed

Installing sshfs fails on CentOS #342

afbjorklund opened this issue Oct 18, 2021 · 7 comments · Fixed by #344
Milestone

Comments

@afbjorklund
Copy link
Member

[   38.495119] cloud-init[1376]: + dnf install -y fuse-sshfs
[   39.845344] cloud-init[1376]: CentOS Linux 8 - AppStream                       13 MB/s | 9.3 MB     00:00
[   42.306361] cloud-init[1376]: CentOS Linux 8 - BaseOS                         9.6 MB/s | 7.5 MB     00:00
[   44.128504] cloud-init[1376]: CentOS Linux 8 - Extras                          21 kB/s |  10 kB     00:00
[   44.950542] cloud-init[1376]: No match for argument: fuse-sshfs
[   44.973079] cloud-init[1376]: Error: Unable to find a match: fuse-sshfs

Apparently you need to enable "PowerTools", in order to have sshfs...

https://centos.pkgs.org/8/centos-powertools-x86_64/fuse-sshfs-2.8-5.el8.x86_64.rpm.html

And probably should use "yum" rather than "dnf", on this distribution ?

# yum --enablerepo powertools install -y fuse-sshfs
CentOS Linux 8 - PowerTools                                                                                                              2.6 MB/s | 2.4 MB     00:00    
Last metadata expiration check: 0:00:01 ago on Mon 18 Oct 2021 03:43:59 PM UTC.
Dependencies resolved.
=========================================================================================================================================================================
 Package                                  Architecture                         Version                                    Repository                                Size
=========================================================================================================================================================================
Installing:
 fuse-sshfs                               x86_64                               2.8-5.el8                                  powertools                                56 k
Installing dependencies:
 fuse                                     x86_64                               2.9.7-12.el8                               baseos                                    82 k

Transaction Summary
=========================================================================================================================================================================
Install  2 Packages
@afbjorklund
Copy link
Member Author

For the legacy CentOS 7 (from 2014) it was not available in the distribution at all, so one had to use EPEL packages.

https://centos.pkgs.org/7/epel-x86_64/fuse-sshfs-2.10-1.el7.x86_64.rpm.html

@afbjorklund
Copy link
Member Author

afbjorklund commented Oct 18, 2021

Both "yum" and "dnf" (yum4) link to the same /usr/bin/dnf-3, so I guess it is mostly a question of backwards compatibility

bash: dnf: command not found

@afbjorklund
Copy link
Member Author

afbjorklund commented Oct 18, 2021

It (fuse-sshfs) is not available as an RPM for Red Hat Enterprise Linux, so that is (ironically enough) unsupported for now...

It can probably be built from source, if desired: fuse-sshfs-2.8-5.fc28.src.rpm. And the result put in an accessible dnf repo.

@afbjorklund

This comment was marked as outdated.

@jeffguorg
Copy link

jeffguorg commented May 12, 2022

Alma Linux 9 beta is already released. RHEL9 is released and Rocky Linux 9 is expected to be released in a few month.

I found EL's official base repos does not contain sshfs any more. Instead there is a fuse-sshfs in epel-release of every el version:

[root@lima-cs9 lima-cidata]# dnf info fuse-sshfs
Last metadata expiration check: 0:15:33 ago on Thu 12 May 2022 04:11:46 AM EDT.
Installed Packages
Name         : fuse-sshfs
Version      : 3.7.2
Release      : 2.el9
Architecture : x86_64
Size         : 123 k
Source       : fuse-sshfs-3.7.2-2.el9.src.rpm
Repository   : @System
From repo    : epel
Summary      : FUSE-Filesystem to access remote filesystems via SSH
URL          : https://github.com/libfuse/sshfs
License      : GPLv2
Description  : This is a FUSE-filesystem client based on the SSH File Transfer Protocol.
             : Since most SSH servers already support this protocol it is very easy to set
             : up: i.e. on the server side there's nothing to do.  On the client side
             : mounting the filesystem is as easy as logging into the server with ssh.

Should we rely on epel-release for sshfs?

If so, we'd better install epel-release package before we install any pkgs:

if [ -n "${pkgs}" ]; then
dnf_install_flags="-y --setopt=install_weak_deps=False"
if grep -q "Oracle Linux Server release 8" /etc/system-release; then
# repo flag instead of enable repo to reduce metadata syncing on slow Oracle repos
dnf_install_flags="${dnf_install_flags} --repo ol8_baseos_latest --repo ol8_codeready_builder"
elif grep -q "release 8" /etc/system-release; then
dnf_install_flags="${dnf_install_flags} --enablerepo powertools"
fi
# shellcheck disable=SC2086
dnf install ${dnf_install_flags} ${pkgs}

@afbjorklund @AkihiroSuda

@AkihiroSuda
Copy link
Member

Yes, we should use EPEL

@afbjorklund
Copy link
Member Author

I think the "PowerTools" and the "EPEL", were both built from the same original Fedora SRPM ?

Ironically, the package for EL7 was newer than the one for EL8 - since it was actually bumped...

* Wed Aug 15 2018 Michael Cronenworth <[email protected]> - 2.10-1
- Ver. 2.10 - last 2.x release

* Fri Jul 13 2018 Fedora Release Engineering <[email protected]> - 2.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <[email protected]> - 2.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

fuse-sshfs-2.8-5.fc28.src.rpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants