Installation of sshfs via brew fails with dependency error for macFUSE although that's installed
porg opened this issue · 3 comments
Foreword to the maintainer
I read your disclaimer and am aware that this project is in minimal maintenance only. But I wanted to file this issue at the (hopefully) relevant place, as I saw people discussing this at various forums, where the issue is indirectly involved.
Environment
- macOS 11.4 Big Sur
- 64bit Intel Mac
- brew 3.2.0
Reproduction I - The "brew-only" way - Buggy
$ brew install macFUSE
- My .zsh_history shows that I ran this.
- Don't recall result exactly, but it was strange, not successful.
- Note that
brew info macfuse
mentions:
==> Caveats
macfuse requires a kernel extension to work.
If the installation fails, retry after you enable it in:
System Preferences → Security & Privacy → General
$ brew install sshfs
and I don't recall the outcome of this either.
The reason seems to be a chicken-egg-problem caused by the raised Kernel Extension Security Settings of macOS Big Sur. See my assumption and the workaround in Reproduction III.
Reproduction II — Mixed install methods — macFUSE PKG + sshfs via brew — Fails too
- Went to https://osxfuse.github.io > Downloads > Downloaded .PKG wrapped in .DMG disk image > Installed macFUSE 4.1.2
1.1. So far so good. Seemed to be installed:
1.1.1. System Preferences > macFUSE showed up among the third party preference panes (last row)
1.1.2. Opened prefPane > Worked. Ran "Check for Updated". Worked. Said it's the newest one.
1.2. But not certain whether it was "loaded"
1.2.1. System Preferences > Security & Privacy > General: No warning. No "accept third party kernel extension" or similar.
1.2.3. /Applications/Utilities/System Information.app > Software > Extensions: Showed no macFUSE entry
1.2.3. System restart. Still the same situation. $ brew install sshfs
fails with:Error: sshfs has been disabled because it requires FUSE!
Reproduction III — macFUSE and sshfs both via PKG installer — Works!
- Went to https://osxfuse.github.io > Downloads
a. Installed macFUSE 4.1.2 via PKG installer on a DMG disk image
b. Installed ssh 2.5.0 via PKG installer on a DMG disk image - Restarted OS — Nothing! Same situation as Reproduction II 1.2.
- Workaround / Solution — It's a chicken-egg-problem (maybe one could also call it circular dependency problem).
I guess that's'why Reproduction I "brew-only" fails.
- Run your first
$ sshfs username@server:/path-on-server/ ~/path-to-mount-point
command. - Run another
$ sshfs username@server:/path-on-server/ ~/path-to-mount-point
command. - Now it works! The remote volume is loaded at the local mountpoint.
Afterword
- Hope that workarround helps others!
- Please give a ❤️ if it helped you!
- Hope that the convenient combined brew install of macFUSE + sshfs will work again in the future.
- Please give a 👍 if you 'd appreciate that too.
Reason
@Homebrew member @carlocab answered at: Homebrew/discussions#1760 (comment)
macFUSE is no longer open source, and we don't allow non-open source dependencies in Homebrew/core. If you need formulae that depend on macFUSE, try https://github.com/gromgit/homebrew-fuse.
Solution Principle
As instructed on homebrew-fuse:
- Uninstall all previous macFUSE dependent formulae.
- Then install the homebrew-fuse versions, which all use as
-mac
suffix.- Just try if your needed macFUSE plugin is available by
$ brew info XYZ-mac
or by looking at the Formula list.
- Just try if your needed macFUSE plugin is available by
Concrete Solution
- I got what I needed by:
$ brew install macfuse sshfs-mac curlftpfs-mac
- Where necessary I used
link --overwrite
as brew suggested, i.e.brew link --overwrite sshfs-mac
- Where necessary I used
- Then run your first
$ sshfs username@server:/path-on-server/ ~/path-to-mount-point
command. - Run another
$ sshfs username@server:/path-on-server/ ~/path-to-mount-point
command.
Concrete Solution
- I got what I needed by:
$ brew install macfuse sshfs-mac curlftpfs-mac
Not working anymore:
Error: No available formula with the name "sshfs-mac". Did you mean sshfs?
brew info sshfs
==> sshfs: stable 3.7.3
File system client based on SSH File Transfer Protocol
https://github.com/libfuse/sshfs
Deprecated because it has an archived upstream repository!
==> Requirements
Required: Linux ✘
- Certainly not sshfs for Linux on a Mac.
- Sorry to read that package
sshfs-mac
is not available for you on your Mac. - I'm on the older macOS 11 Big Sur and
brew info
tells me the following:
$ brew info sshfs-mac
==> gromgit/fuse/sshfs-mac: stable 2.10 (bottled)
File system client based on SSH File Transfer Protocol
https://github.com/libfuse/sshfs
/usr/local/Cellar/sshfs-mac/2.10_1 (8 files, 147.4KB) *
Poured from bottle on 2021-06-30 at 22:38:16
From: https://github.com/gromgit/homebrew-fuse/blob/HEAD/Formula/sshfs-mac.rb
License: LGPL-2.1-only or GPL-2.0-only
==> Dependencies
Build: autoconf ✔, automake ✘, libtool ✔, pkg-config ✔
Required: glib ✔
==> Requirements
Required: macFUSE ✔, macOS ✔
==> Caveats
This formula is outdated, and is provided only as a courtesy.
It cannot be updated until macFUSE supports FUSE API version 3.
If security issues are discovered with this old software,
it may be removed without notice.