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

Error: ext4fuse has been disabled because it requires FUSE! #66

Open
vittau opened this issue Apr 14, 2021 · 53 comments
Open

Error: ext4fuse has been disabled because it requires FUSE! #66

vittau opened this issue Apr 14, 2021 · 53 comments

Comments

@vittau
Copy link

vittau commented Apr 14, 2021

Getting the error Error: ext4fuse has been disabled because it requires FUSE! after trying brew install ext4fuse, after installing osxfuse with brew install --cask osxfuse and rebooting. How do I proceed?

@marcuspridham
Copy link

marcuspridham commented Apr 15, 2021

Found this error today also. From what I can gather, Homebrew has disabled a bunch of formula that use FUSE because it's no longer open source so they don't want it in the homebrew-core. Using taps (formulas hosted on GitHub repos outside Homebrew) is the new approach and an example can be found here. This project needs to move to a tap also.

A quick workaround:

  1. Create a file called ext4fuse.rb with the following contents:
class MacFuseRequirement < Requirement
  fatal true

  satisfy(build_env: false) { self.class.binary_mac_fuse_installed? }

  def self.binary_mac_fuse_installed?
    File.exist?("/usr/local/include/fuse/fuse.h") &&
      !File.symlink?("/usr/local/include/fuse")
  end

  env do
    ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"

    unless HOMEBREW_PREFIX.to_s == "/usr/local"
      ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"
      ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include/fuse"
    end
  end

  def message
    "macFUSE is required. Please run `brew install --cask macfuse` first."
  end
end

class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git"

  bottle do
    sha256 cellar: :any, catalina:    "446dde5e84b058966ead0cde5e38e9411f465732527f6decfa1c0dcdbd4abbef"
    sha256 cellar: :any, mojave:      "88c4918bf5218f99295e539fe4499152edb3b60b6659e44ddd68b22359f512ae"
    sha256 cellar: :any, high_sierra: "fc69c8993afd0ffc16a73c9c036ca8f83c77ac2a19b3237f76f9ccee8b30bbc9"
    sha256 cellar: :any, sierra:      "fe8bbe7cd5362f00ff06ef750926bf349d60563c20b0ecf212778631c8912ba2"
    sha256 cellar: :any, el_capitan:  "291047c821b7b205d85be853fb005510c6ab01bd4c2a2193c192299b6f049d35"
    sha256 cellar: :any, yosemite:    "b11f564b7e7c08af0b0a3e9854973d39809bf2d8a56014f4882772b2f7307ac1"
  end

  depends_on "pkg-config" => :build

  on_macos do
    depends_on MacFuseRequirement => :build
  end

  on_linux do
    depends_on "libfuse"
  end

  def install
    system "make"
    bin.install "ext4fuse"
  end
end
  1. Run the following commands from the directory the file you created is in:
brew install --cask macfuse
brew install --formula --build-from-source ./ext4fuse.rb

⚠️ **You might need to remove osxfuse as it is renamed to macfuse using the command below **

brew rm --cask osxfuse  

@YaPaY
Copy link

YaPaY commented Apr 19, 2021

unfortunately I am getting this error:
Cask 'ext4fuse' is unreadable: wrong constant name #Class:0x00007f7f3d15f6f8
Warning: Treating ./ext4fuse.rb as a formula.

@andrewssobral
Copy link

Same error for me on Big Sur 11.2.3:

brew install --build-from-source ./ext4fuse.rb
Error: Failed to load cask: ./ext4fuse.rb
Cask 'ext4fuse' is unreadable: wrong constant name #<Class:0x00007f89ca9b2570>
Warning: Treating ./ext4fuse.rb as a formula.
==> Downloading https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz
==> Downloading from https://codeload.github.com/gerard/ext4fuse/tar.gz/v0.1.3
#=#=#                                                                         
==> make
🍺  /usr/local/Cellar/ext4fuse/0.1.3: 5 files, 93.2KB, built in 6 seconds

any news on that?

@marcuspridham
Copy link

Sorry add the formula flag also.

brew install --formula --build-from-source ./ext4fuse.rb

@andrewssobral
Copy link

Thank you @marcuspridham

@FelixLisczyk
Copy link

Thanks! I'm running this script on a M1 Mac with Homebrew installed in /opt/homebrew/. I had to append /usr/local/lib/pkgconfig to the PKG_CONFIG_PATH variable (line 12) in order to make it work. Otherwise I would receive the following error output:

$ brew install --formula --build-from-source ./ext4fuse.rb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 22 formulae.

==> Downloading https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz
Already downloaded: /Users/felix/Library/Caches/Homebrew/downloads/d966857ac132d4b34d8fe114f4a1e67f636f6b48f9b96201c91f1782dcdbfedd--ext4fuse-0.1.3.tar.gz
==> make
Last 15 lines from /Users/felix/Library/Logs/Homebrew/ext4fuse/01.make:
Package fuse was not found in the pkg-config search path.
Perhaps you should add the directory containing `fuse.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fuse' found
clang -o ext4fuse fuse-main.o logging.o extents.o disk.o super.o inode.o dcache.o op_read.o op_readdir.o op_readlink.o op_init.o op_getattr.o op_open.o
Undefined symbols for architecture arm64:
  "_fuse_main_real", referenced from:
      _main in fuse-main.o
  "_fuse_opt_free_args", referenced from:
      _main in fuse-main.o
  "_fuse_opt_parse", referenced from:
      _main in fuse-main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ext4fuse] Error 1

Do not report this issue to Homebrew/brew or Homebrew/core!

Traceback (most recent call last):
	26: from /opt/homebrew/Library/Homebrew/build.rb:229:in `<main>'
	25: from /opt/homebrew/Library/Homebrew/build.rb:133:in `install'
	24: from /opt/homebrew/Library/Homebrew/utils.rb:558:in `with_env'
	23: from /opt/homebrew/Library/Homebrew/build.rb:138:in `block in install'
	22: from /opt/homebrew/Library/Homebrew/formula.rb:1259:in `brew'
	21: from /opt/homebrew/Library/Homebrew/formula.rb:2318:in `stage'
	20: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in `stage'
	19: from /opt/homebrew/Library/Homebrew/resource.rb:91:in `stage'
	18: from /opt/homebrew/Library/Homebrew/resource.rb:116:in `unpack'
	17: from /opt/homebrew/Library/Homebrew/resource.rb:199:in `mktemp'
	16: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in `run'
	15: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
	14: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
	13: from /opt/homebrew/Library/Homebrew/resource.rb:117:in `block in unpack'
	12: from /opt/homebrew/Library/Homebrew/download_strategy.rb:102:in `stage'
	11: from /opt/homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
	10: from /opt/homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
	 9: from /opt/homebrew/Library/Homebrew/resource.rb:121:in `block (2 levels) in unpack'
	 8: from /opt/homebrew/Library/Homebrew/formula.rb:2338:in `block in stage'
	 7: from /opt/homebrew/Library/Homebrew/utils.rb:558:in `with_env'
	 6: from /opt/homebrew/Library/Homebrew/formula.rb:2339:in `block (2 levels) in stage'
	 5: from /opt/homebrew/Library/Homebrew/formula.rb:1266:in `block in brew'
	 4: from /opt/homebrew/Library/Homebrew/build.rb:178:in `block (2 levels) in install'
	 3: from /Users/felix/Downloads/ext4fuse.rb:55:in `install'
	 2: from /opt/homebrew/Library/Homebrew/formula.rb:2111:in `system'
	 1: from /opt/homebrew/Library/Homebrew/formula.rb:2111:in `open'
/opt/homebrew/Library/Homebrew/formula.rb:2175:in `block in system': Failed executing: make (BuildError)
	5: from /opt/homebrew/Library/Homebrew/brew.rb:155:in `<main>'
	4: from /opt/homebrew/Library/Homebrew/brew.rb:167:in `rescue in <main>'
	3: from /opt/homebrew/Library/Homebrew/exceptions.rb:494:in `dump'
	2: from /opt/homebrew/Library/Homebrew/exceptions.rb:440:in `issues'
	1: from /opt/homebrew/Library/Homebrew/exceptions.rb:444:in `fetch_issues'
/opt/homebrew/Library/Homebrew/utils/github.rb:66:in `issues_for_formula': undefined method `full_name' for nil:NilClass (NoMethodError)

@pelcasandra
Copy link

pelcasandra commented May 20, 2021

I'm also getting the same error than @felixII on an Intel MacBook which still persists after appending the suggested path.

@ActionsPerMinute
Copy link

for those looking for solutions, this eventually worked for me also, on mojave:
brew install --formula --build-from-source ./ext4fuse.rb

@xxvxxv
Copy link

xxvxxv commented Jun 11, 2021

A quick workaround:

  1. Create a file called ext4fuse.rb with the following contents:

To where and how I should create the file?

@tmigone
Copy link

tmigone commented Jun 11, 2021

@xxvxxv you can put the file anywhere, it doesn't matter. I just tried this method and it worked. macOS catalina.

brandt added a commit to brandt/homebrew-personal that referenced this issue Jul 26, 2021
Some additional context here:
- Homebrew/brew#9401
- gerard/ext4fuse#66

Existing installs might need to uninstall and reinstall like so:

- `brew rm --cask osxfuse`
- `brew install --cask macfuse`
- `brew uninstall fuse-xfs`
- `brew install fuse-xfs`
@Zemke
Copy link

Zemke commented Aug 15, 2021

According to #66 the bottle for Big Sur is

  sha256 cellar: :any,                   big_sur:       "5dc376aa20241233b76e2ec2c1d4e862443a0250916b2838a1ff871e8a6dc2c5"

There’s another ARM (Apple M1) architecture bottle on that page, too.

Edit: That’s to be updated in the Ruby script earlier in this thread.

@seyfer
Copy link

seyfer commented Oct 20, 2021

Do brew install macfuse, not osxfuse
Then just open the formula with

vi `brew formula ext4fuse`

and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

@magic-thomas
Copy link

Do brew install macfuse, not osxfuse Then just open the formula with - "vi brew formula ext4fuse" and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

Hi .. looks almost done.

But "vi brew formula ext4fuse" is weird.

What is correct file to edit ?

@gmcmillan82
Copy link

Do brew install macfuse, not osxfuse Then just open the formula with - "vi brew formula ext4fuse" and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

Hi .. looks almost done.

But "vi brew formula ext4fuse" is weird.

What is correct file to edit ?

I think it should be brew edit ext4fuse.

@dmelgar
Copy link

dmelgar commented Oct 23, 2021

I tried the commands as above, editing ext4fuse, then attempting brew install ext4fuse and received an error.

ext4fuse: no bottle available!

I am running Mac OS 12.0.1 Monterey RC2.

@pentago
Copy link

pentago commented Oct 25, 2021

The command is vi $(brew formula ext4fuse)

@seyfer
Copy link

seyfer commented Oct 27, 2021

I meant, GitHub ate my code markup

vi `brew formula ext4fuse`

this will also work

vi $(brew formula ext4fuse)

@dmelgar, idk about the new version you have, but it works on BigSur 11.6

@Horia73
Copy link

Horia73 commented Nov 1, 2021

I tried the commands as above, editing ext4fuse, then attempting brew install ext4fuse and received an error.

ext4fuse: no bottle available!

I am running Mac OS 12.0.1 Monterey RC2.

I also encountered this when I was trying to mount rip sd card. Still no clue how to do it. Same version, Macbook pro 16 M1 Pro

@jeffxor
Copy link

jeffxor commented Nov 19, 2021

I tried the commands as above, editing ext4fuse, then attempting brew install ext4fuse and received an error.

ext4fuse: no bottle available!

I am running Mac OS 12.0.1 Monterey RC2.

I also encountered this when I was trying to mount rip sd card. Still no clue how to do it. Same version, Macbook pro 16 M1 Pro

Appears there is no build for Monterey. Is this planned?

  • Sucks that I go a new laptop and it is blocking me from development. Love to have this ASAP

@brianyoungblood
Copy link

@jeffxor I used a version of this https://stackoverflow.com/a/68091613/4450997 and it worked for me to disable the check and I was able to install.

zigmars added a commit to zigmars/homebrew-taps that referenced this issue Nov 28, 2021
zigmars added a commit to zigmars/homebrew-taps that referenced this issue Nov 29, 2021
@geerlingguy
Copy link
Contributor

Same here, Error: ext4fuse: no bottle available!.

Source install (brew install --build-from-source ext4fuse) fails with:

No package 'fuse' found
fuse-main.c:14:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
In file included from op_read.c:20:
./ops.h:4:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
1 error generated.

This is on 11.6 Big Sur, M1 mac mini.

@nnelas
Copy link

nnelas commented Dec 7, 2021

For those who are having Error: ext4fuse: no bottle available!:
1 - Perform the steps provided earlier by @marcuspridham, but don't install ext4fuse yet
2 - Make sure you add /usr/local/lib/pkgconfig to your PKG_CONFIG_PATH, just like @FelixLisczyk mentioned
3 - Install
Working with M1 running macOs Monterey

@mietzen
Copy link

mietzen commented Dec 19, 2021

Here's @marcuspridham script with the appended path from @FelixLisczyk. Just tested this under macOS 12.1 👍
https://gist.github.com/n-stone/413e407c8fd73683e7e926e10e27dd4e

curl -s -o ext4fuse.rb https://gist.githubusercontent.com/n-stone/413e407c8fd73683e7e926e10e27dd4e/raw/12b463eb0be3421bdda5db8ef967bfafbaa915c5/ext4fuse.rb
brew install --formula --build-from-source ./ext4fuse.rb
rm ./ext4fuse.rb

@dingyx99
Copy link

Do brew install macfuse, not osxfuse Then just open the formula with

vi `brew formula ext4fuse`

and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

Thanks for your help, it works on my Mac!

System Version: macOS Monterey 12.1 (21C52)

@wethinkagile
Copy link

A year later, same issue, new error: ext4fuse: no bottle available!

@Calorion
Copy link

Calorion commented Jun 4, 2022

Okay, so Homebrew will install MacFUSE, but not anything that depends on it???

@JohannVonDiesel
Copy link

JohannVonDiesel commented Jul 12, 2022

This:

Do brew install macfuse, not osxfuse Then just open the formula with

vi `brew formula ext4fuse`

and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

This is the correct answer in 2022.

@Hulkstern
Copy link

This:

Do brew install macfuse, not osxfuse Then just open the formula with

vi `brew formula ext4fuse`

and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

This is the correct answer in 2022.

Are you running monterey? I haven't been able to get this working on my M1 Monterey system.

@JohannVonDiesel
Copy link

This is the correct answer in 2022.

Are you running monterey? I haven't been able to get this working on my M1 Monterey system.

Not on M1. Sorry, should have prefaced the response with that.

@Hulkstern
Copy link

This is the correct answer in 2022.

Are you running monterey? I haven't been able to get this working on my M1 Monterey system.

Not on M1. Sorry, should have prefaced the response with that.

Managed to get it working, for those struggling with this (like I was) and needing copy/paste instructions, do as follows.

Install macFuse:
brew install macFuse

If are not comfortable with vi or don't have a good text editor like vscode, sublime text, etc. also run:
brew install nano

Copy and paste the following script into your text editor and save as ext4fuse.rb preferably in your home folder or downloads folder.

For those using nano. Start editing a file with.
nano ext4fuse.4b
Once you have pasted the script in, save and exit with CTRL + X, and answer yes to the save prompt.

ext4fuse.rb

class MacFuseRequirement < Requirement
  fatal true

  satisfy(build_env: false) { self.class.binary_mac_fuse_installed? }

  def self.binary_mac_fuse_installed?
    File.exist?("/usr/local/include/fuse/fuse.h") &&
      !File.symlink?("/usr/local/include/fuse")
  end

  env do
    ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"
    ENV.append_path "PKG_CONFIG_PATH", "/usr/local/lib/pkgconfig"

    unless HOMEBREW_PREFIX.to_s == "/usr/local"
      ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"
      ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include/fuse"
    end
  end

  def message
    "macFUSE is required. Please run `brew install --cask macfuse` first."
  end
end

class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git"

  bottle do
    sha256 cellar: :any, catalina:    "446dde5e84b058966ead0cde5e38e9411f465732527f6decfa1c0dcdbd4abbef"
    sha256 cellar: :any, mojave:      "88c4918bf5218f99295e539fe4499152edb3b60b6659e44ddd68b22359f512ae"
    sha256 cellar: :any, high_sierra: "fc69c8993afd0ffc16a73c9c036ca8f83c77ac2a19b3237f76f9ccee8b30bbc9"
    sha256 cellar: :any, sierra:      "fe8bbe7cd5362f00ff06ef750926bf349d60563c20b0ecf212778631c8912ba2"
    sha256 cellar: :any, el_capitan:  "291047c821b7b205d85be853fb005510c6ab01bd4c2a2193c192299b6f049d35"
    sha256 cellar: :any, yosemite:    "b11f564b7e7c08af0b0a3e9854973d39809bf2d8a56014f4882772b2f7307ac1"
  end

  depends_on "pkg-config" => :build

  on_macos do
    depends_on MacFuseRequirement => :build
  end

  on_linux do
    depends_on "libfuse"
  end

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

Then finally, run this to build and install ext4fuse
brew install --formula --build-from-source ./ext4fuse.rb

These are the steps I took to get it working on my M1 Pro system running Monterey 12.4.

Thanks to @marcuspridham and @FelixLisczyk as it was the combination of their two solutions that ended up getting it working.

@Tahini-123
Copy link

@Hulkstern it didnt work for me, I get Warning: No available formula with the name "./ext4fuse.rb"
Should I somehow point Homebrew to my home directory? I dont know much about it, so apologies in advance if it's a silly question.

@jcwren
Copy link

jcwren commented Jul 28, 2022

Minor error in the instructions in #66 (comment):

For those using nano. Start editing a file with.
nano ext4fuse.4b

Should be:
nano ext4fuse.rb

(Extension was typed incorrectly)

@Tahini-123
Copy link

Thanks @jcwren .
However now I get this:
Error: ext4fuse: wrong number of arguments (given 0, expected 1)

@jcwren
Copy link

jcwren commented Jul 28, 2022

Thanks @jcwren . However now I get this: Error: ext4fuse: wrong number of arguments (given 0, expected 1)

I think we'd need to see exactly what you're typing to see what might be going wrong.

FWIW, I did get it compiled and installed, but after trying sudo ext4fuse mount /dev/disk3s2 /tmp/xxx -o allow_other, I kept getting some kind of not found messages (I've since closed the tab, don't remember exactly what it was), in spite of /dev/disk3s2 being present, along with the mount point. I gave up and ended up mounting the SD card I needed to look at on a Raspberry Pi with a SD card adapter.

@Tahini-123
Copy link

I followed the instructions above

brew install macFuse
brew install nano
nano ext4fuse.rb

pasted that script in, saved
brew install --formula --build-from-source ./ext4fuse.rb
That's where I get the error

@newearthmartin
Copy link

newearthmartin commented Jul 31, 2022

Hello, can someone please update the project README to add a few simple commands to install this on mac? Thanks

@simonron
Copy link

simonron commented Aug 2, 2022

I have also failed to get this to work after several hours on an M1 Monterey. System Preferences shows that version 4.4.0 is present. No errors indicated. I can't get Finder to show anything of the EXT4 partition.

@wethinkagile
Copy link

I am using Paragon's ext4fs propietary Software now. Works flawless and worth every penny.

@reapo
Copy link

reapo commented Aug 15, 2022

I followed the instructions above

brew install macFuse
brew install nano
nano ext4fuse.rb

pasted that script in, saved brew install --formula --build-from-source ./ext4fuse.rb That's where I get the error

I think this is because your OS is Monterey, which is not in the list of OSes in bottle do.
I don't know how to fix it, though

@christianwgd
Copy link

Anyone who knows how to get the sha256 cellar value for Monterey?

@bogumilo
Copy link

Worked out-of-the-box on the MBA M2 with Monterey:

brew install macFuse
nano ext4fuse.rb

Paste the script from @Hulkstern post above. Save the file.
Double-check the path when brewing from the created script:

brew install --formula --build-from-source ext4fuse.rb

Then create a new folder where you mount:

mkdir linux-images
ext4fuse path/to/example-image.img linux-images

Ext4 image example-image.img is now visible in Finder.

@rsescu
Copy link

rsescu commented Oct 1, 2022

I followed the instructions above

brew install macFuse
brew install nano
nano ext4fuse.rb

pasted that script in, saved brew install --formula --build-from-source ./ext4fuse.rb That's where I get the error

I've had the same issue. Used a different editor than nano to paste the code and it works now. Seems like none introduced some linebreaks when pasting which messed things up. I used VSCode, but anything will probably do.
Can confirm, working now

@syahrizalakbar
Copy link

Thanks @jcwren . However now I get this: Error: ext4fuse: wrong number of arguments (given 0, expected 1)

I got same error like this

@yuxiang-wu
Copy link

Do brew install macfuse, not osxfuse Then just open the formula with

vi `brew formula ext4fuse`

and comment out these lines

# on_macos do                                                                 
  #   disable! date: "2021-04-08", because: "requires FUSE"                     
  # end

after that brew install ext4fuse just works

This works for Mac OS 13.0 Ventura

@almottier
Copy link

I don't have the same formula on my M1, Ventura 13.0.1, so I can't comment on these lines:

$ cat $(brew formula ext4fuse)
class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, x86_64_linux: "5dc94c281e33bde87ef6c239f7ac37ad6653e72d002359ffb01d0f50f1e8278c"
  end

  depends_on "pkg-config" => :build
  depends_on "libfuse@2"
  depends_on :linux # on macOS, requires closed-source macFUSE

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

@bfeinzimer
Copy link

I don't have the same formula on my M1, Ventura 13.0.1, so I can't comment on these lines:

$ cat $(brew formula ext4fuse)
class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, x86_64_linux: "5dc94c281e33bde87ef6c239f7ac37ad6653e72d002359ffb01d0f50f1e8278c"
  end

  depends_on "pkg-config" => :build
  depends_on "libfuse@2"
  depends_on :linux # on macOS, requires closed-source macFUSE

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

Same here, M1, OS 13.0.1

@stvhanna
Copy link

I don't have the same formula on my M1, Ventura 13.0.1, so I can't comment on these lines:

$ cat $(brew formula ext4fuse)
class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, x86_64_linux: "5dc94c281e33bde87ef6c239f7ac37ad6653e72d002359ffb01d0f50f1e8278c"
  end

  depends_on "pkg-config" => :build
  depends_on "libfuse@2"
  depends_on :linux # on macOS, requires closed-source macFUSE

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

Same here on M1 Pro & MacOS 13.1

@simonron
Copy link

simonron commented Jan 10, 2023 via email

@VirtualMachineMan
Copy link

VirtualMachineMan commented Jan 19, 2023

Getting this error on M1 Mac 2020, Monterey:

Error: ext4fuse: wrong number of arguments (given 0, expected 1)

Filename = ext4fuse.rb
Command = brew install --formula --build-from-source ./ext4fuse.rb
Contents of ext4fuse.rb:

class MacFuseRequirement < Requirement
  fatal true

  satisfy(build_env: false) { self.class.binary_mac_fuse_installed? }

  def self.binary_mac_fuse_installed?
    File.exist?("/usr/local/include/fuse/fuse.h") &&
      !File.symlink?("/usr/local/include/fuse")
  end

  env do
    ENV.append_path "PKG_CONFIG_PATH", 
HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"
    ENV.append_path "PKG_CONFIG_PATH", "/usr/local/lib/pkgconfig"

    unless HOMEBREW_PREFIX.to_s == "/usr/local"
      ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"
      ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include/fuse"
    end
  end

  def message
    "macFUSE is required. Please run `brew install --cask macfuse` first."
  end
end

class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 
"550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git"

  bottle do
    sha256 cellar: :any, catalina:    
"446dde5e84b058966ead0cde5e38e9411f465732527f6decfa1c0dcdbd4abbef"
    sha256 cellar: :any, mojave:      
"88c4918bf5218f99295e539fe4499152edb3b60b6659e44ddd68b22359f512ae"
    sha256 cellar: :any, high_sierra: 
"fc69c8993afd0ffc16a73c9c036ca8f83c77ac2a19b3237f76f9ccee8b30bbc9"
    sha256 cellar: :any, sierra:      
"fe8bbe7cd5362f00ff06ef750926bf349d60563c20b0ecf212778631c8912ba2"
    sha256 cellar: :any, el_capitan:  
"291047c821b7b205d85be853fb005510c6ab01bd4c2a2193c192299b6f049d35"
    sha256 cellar: :any, yosemite:    
"b11f564b7e7c08af0b0a3e9854973d39809bf2d8a56014f4882772b2f7307ac1"
  end

  depends_on "pkg-config" => :build

  on_macos do
    depends_on MacFuseRequirement => :build
  end

  on_linux do
    depends_on "libfuse"
  end

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

@jrussell88
Copy link

I don't have the same formula on my M1, Ventura 13.0.1, so I can't comment on these lines:

$ cat $(brew formula ext4fuse)
class Ext4fuse < Formula
  desc "Read-only implementation of ext4 for FUSE"
  homepage "https://github.com/gerard/ext4fuse"
  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"
  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"
  license "GPL-2.0"
  head "https://github.com/gerard/ext4fuse.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, x86_64_linux: "5dc94c281e33bde87ef6c239f7ac37ad6653e72d002359ffb01d0f50f1e8278c"
  end

  depends_on "pkg-config" => :build
  depends_on "libfuse@2"
  depends_on :linux # on macOS, requires closed-source macFUSE

  def install
    system "make"
    bin.install "ext4fuse"
  end
end

I don't have the same formula on my M1, Ventura 13.2, and I couldn't get the suggested solutions to work, however damonbreeden's answer to https://github.com/gerard/ext4fuse/issues/74 is straightforward and worked to enable ext4 access for me.

@erlangparasu
Copy link

erlangparasu commented Feb 19, 2023

@jrussell88 thanks #74 (comment) works for me too

so... brew took a lot of steps to place this package in this situation, and looking closer at it i didn't care to try to reverse engineer all that effort

it's not very hard to build this pkg manually, and if you're in the situation where you're on macOS and trying to mount ext4 volumes, it can pretty reasonably be assumed that you're comfortable with the command line

so with that in mind, these are all the steps required to build the pkg and use it install mac4fuse from https://osxfuse.github.io/, restart

git clone https://github.com/gerard/ext4fuse.git && cd "$(basename "$_" .git)"
make
mkdir ~/ext4_mount
diskutil list # shows you a list of all disks connected to your system, choose your ext4 disk/partition
sudo ./ext4fuse /dev/disk4 ~/ext4_mount -o allow_other # sudo is required
# approve all the security prompts, reboot
sudo ./ext4fuse /dev/disk4 ~/ext4_mount -o allow_other # run again after reboot

lsa ~/ext4_mount 
total 40
dr-xr-xr-x  4 1000  1000    4.0K Nov 26 10:49 Saturday Night Live
dr-x------  2 root  wheel    16K Dec 16 08:50 lost+found

# when finished
sudo umount ~/ext4_mount

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

No branches or pull requests