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

Unable to install on M1 #74

Open
nhusby opened this issue Nov 21, 2022 · 32 comments
Open

Unable to install on M1 #74

nhusby opened this issue Nov 21, 2022 · 32 comments

Comments

@nhusby
Copy link

nhusby commented Nov 21, 2022

I am unable to install this on apple silicon.

I tried installing MacFuse via brew, but that didn't work, so I installed it from the github release and did all of the security stuff. Then I tried installing ext4fuse with this command brew install ext4fuse and I get the following error:

brew install ext4fuse                            
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

ext4fuse: Linux is required for this software.
libfuse@2: Linux is required for this software.
Error: ext4fuse: Unsatisfied requirements failed this build.
@javierlopezdeancos
Copy link

The same error for me in Ventura 13.0.1

@imf
Copy link

imf commented Dec 7, 2022

I am also having this on Ventura 13.0.1...

It has now become quite hard to work with Raspberry Pi SD cards on a Mac.

@sarambasich
Copy link

I am also experiencing this on a 2017 Intel MacBook Pro running Ventura 13.0.1 (22A400).

@ramazk
Copy link

ramazk commented Dec 17, 2022

Same on M1 Monterey 12.3.1. MacFuse updated to last 4.4.1 version but it didn't help.

@damonbreeden
Copy link

damonbreeden commented Dec 23, 2022

due to Homebrew/homebrew-core@ab05068#diff-5b5676e31cbcdb12ec4fc584f8f80f834183d0634835e53b2cea9fdc4fe63d8dR14

i'll try and make my own tap that doesn't have this limit

edit: brew took a lot of steps to deprecate fuse, this is considerably more involved than just commenting out the requirements line: https://github.com/Homebrew/homebrew-core/pull/64491/files#diff-5b5676e31cbcdb12ec4fc584f8f80f834183d0634835e53b2cea9fdc4fe63d8d

i'll take a closer look next month when my company does open-source fridays (we work on OS projects instead of work projects one day each month)

@mitchellvanbijleveld
Copy link

This is really unfortunate. I hope there will be a fix in the future!

@damonbreeden
Copy link

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

@marciano1
Copy link

Buster
My diskutil disk:
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *64.0 GB disk4
1: Windows_FAT_32 ⁨boot⁩ 268.4 MB disk4s1
2: Linux ⁨⁩ 63.7 GB disk4s2

Mount error: Partition doesn't contain EXT4 filesystem

@swoodford
Copy link

@marciano1 I had a similar error:

/dev/disk6 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *31.9 GB    disk6
   1:             Windows_FAT_32 boot                    45.2 MB    disk6s1
   2:                      Linux                         31.9 GB    disk6s2

ext4fuse % sudo ./ext4fuse /dev/disk6 ~/ext4_mount -o allow_other
Partition doesn't contain EXT4 filesystem

@damonbreeden
Copy link

damonbreeden commented Feb 24, 2023 via email

@swoodford
Copy link

yes, you are right, I was going to edit my comment but you were too quick! got a bunch of security warnings (on Ventura 13.2.1) which I'll have to work through then try again

@swoodford
Copy link

After all these security messages, about 7 reboots, booting into the Recovery environment and changing settings in Startup Security Utility I got it working!

System Extension Blocked

The system extension required for mounting macFUSE volumes could not be loaded.

Please open the Security & Privacy System Preferences pane, go to the General preferences and allow loading system software from developer "Benjamin Fleischer". A restart might be required before the system extension can be loaded.

Then try mounting the volume again.

To enable system extensions, you need to modify your security settings in the Recovery environment.

To do this, shut down your system. Then press and hold the Touch ID or power button to launch Startup Security Utility. In Startup Security Utility, enable kernel extensions from the Security Policy button.

A program tried to load new system extension(s) signed by “Benjamin Fleischer”. You can enable these extensions in Privacy & Security System Settings.

@roxgib
Copy link

roxgib commented Feb 28, 2023

How do I trigger these 'security prompts'? I'm able to mount a drive using the instructions @damonbreeden provided and list the contents with sudo ls, but I can only access it using sudo and only certain commands work (e.g. rsync can't see inside even with sudo)

@damonbreeden
Copy link

damonbreeden commented Feb 28, 2023 via email

@acrylica
Copy link

acrylica commented Mar 5, 2023

@damonbreeden

Hi, I followed your steps but I get this error :
ls: /Users/stephane/2TB: Input/output error

@roxgib
Copy link

roxgib commented Mar 7, 2023

Sounds like you forgot to use ‘allow_other’ when you mounted

Nope, I used the exact command you provided, except to adjust the name of the drive

@damonbreeden
Copy link

damonbreeden commented Mar 25, 2023 via email

@psiberfunk
Copy link

psiberfunk commented Apr 7, 2023

Also getting the input/output error , and i'm using -o allow_other .. confused as heck.. suggestions @damonbreeden ? get the IO error even with trying to browse as root via sudo su

ext4fuse % sudo ./ext4fuse /dev/disk2s2 ~/ext4_mount -o allow_other

Looks like this is also the issue in #75

@psiberfunk
Copy link

@damonbreeden

Hi, I followed your steps but I get this error : ls: /Users/stephane/2TB: Input/output error

@acrylica did you figure out a solution to this ?

@omnigodz
Copy link

I am also having this on Ventura 13.0.1...

It has now become quite hard to work with Raspberry Pi SD cards on a Mac.

Sorry, my question is a bit out of the topic being discussed here. I always setup my raspberry pi in complete headless mode and for that I need to have write access to the rootfs but unfortunately with ext4fuse I only have read access. Is there any alternative or an option to do this mac?

@waytgibbs
Copy link

waytgibbs commented Sep 2, 2023

The code to compile provided by @damonbreeden did not work for me on Ventura 13.5.1 because make failed. I replaced the line
make
with
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make
and the code compilation then completed.
Unfortunately the software does not work on an external USB drive. As others have reported, ext4fuse does complete the mount operation, but attempts to view directories or files return an I/O error:
MacBook17:ext4fuse wayt$ ls ~/ext4_mount
ls: /Users/wayt/ext4_mount: Input/output error

@qsz13
Copy link

qsz13 commented Sep 12, 2023

The author did mention that

Block numbers over 32 bits aren't supported. You hit those when you reach around the terabyte

I wonder if that's the reason we are hitting Input/output error. I'm running Monterey on an intel chip with a 14T external hard drive.

@rkarlsba
Copy link

rkarlsba commented Nov 1, 2023

L005649:ext4fuse roysk$ brew install ext4fuse
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

ext4fuse: Linux is required for this software.
libfuse@2: Linux is required for this software.
Error: ext4fuse: Unsatisfied requirements failed this build.
L005649:ext4fuse roysk$

So - grabbing the source from github and installed fuse with brew, trying to make

L005649:ext4fuse roysk$ 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
cc  -DFUSE_USE_VERSION=26 -std=gnu99 -g3 -Wall -Wextra -DEXT4FUSE_VERSION=\"v0.1.3-20-g6b23d8d\" -mmacosx-version-min=10.5 -D_FILE_OFFSET_BITS=64   -c -o fuse-main.o fuse-main.c
fuse-main.c:14:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
1 error generated.
make: *** [fuse-main.o] Error 1
L005649:ext4fuse roysk$

Any idea where I can find that header file and its friends? I thought of fuse-dev or something, but I can't find that with brew.

@giacomd
Copy link

giacomd commented Nov 26, 2023

Hey all, I managed to solve the input/output error with the fix mentioned at #2 (comment)
(Basically, remove an extra flag and rebuild).
HTH

@RobotLimeLtd
Copy link

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

This doesn't work on my M1 Mac (running Sonoma)...

cc -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 -L/usr/local/lib -losxfuse
ld: warning: ignoring file '/usr/local/lib/libosxfuse.2.dylib': fat file missing arch 'arm64', file has 'unknown,unknown,i386,x86_64'
ld: Undefined symbols:
  _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
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ext4fuse] Error 1

@alibekch
Copy link

alibekch commented Jan 4, 2024

So - grabbing the source from github and installed fuse with brew, trying to make

L005649:ext4fuse roysk$ 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
cc  -DFUSE_USE_VERSION=26 -std=gnu99 -g3 -Wall -Wextra -DEXT4FUSE_VERSION=\"v0.1.3-20-g6b23d8d\" -mmacosx-version-min=10.5 -D_FILE_OFFSET_BITS=64   -c -o fuse-main.o fuse-main.c
fuse-main.c:14:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
1 error generated.
make: *** [fuse-main.o] Error 1
L005649:ext4fuse roysk$

Any idea where I can find that header file and its friends? I thought of fuse-dev or something, but I can't find that with brew.

were you able to install the package properly?

@netlykos
Copy link

netlykos commented Jan 7, 2024

So - grabbing the source from github and installed fuse with brew, trying to make

L005649:ext4fuse roysk$ 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
cc  -DFUSE_USE_VERSION=26 -std=gnu99 -g3 -Wall -Wextra -DEXT4FUSE_VERSION=\"v0.1.3-20-g6b23d8d\" -mmacosx-version-min=10.5 -D_FILE_OFFSET_BITS=64   -c -o fuse-main.o fuse-main.c
fuse-main.c:14:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
1 error generated.
make: *** [fuse-main.o] Error 1
L005649:ext4fuse roysk$

Any idea where I can find that header file and its friends? I thought of fuse-dev or something, but I can't find that with brew.

were you able to install the package properly?

I found fuse.h using locate in these locations:

> locate fuse.h
/usr/local/include/fuse/fuse.h
/usr/local/include/fuse.h

Guessing they were installed there by macFUSE.

@netlykos
Copy link

netlykos commented Jan 7, 2024

So - grabbing the source from github and installed fuse with brew, trying to make

L005649:ext4fuse roysk$ 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
cc  -DFUSE_USE_VERSION=26 -std=gnu99 -g3 -Wall -Wextra -DEXT4FUSE_VERSION=\"v0.1.3-20-g6b23d8d\" -mmacosx-version-min=10.5 -D_FILE_OFFSET_BITS=64   -c -o fuse-main.o fuse-main.c
fuse-main.c:14:10: fatal error: 'fuse.h' file not found
#include <fuse.h>
         ^~~~~~~~
1 error generated.
make: *** [fuse-main.o] Error 1
L005649:ext4fuse roysk$

Any idea where I can find that header file and its friends? I thought of fuse-dev or something, but I can't find that with brew.

were you able to install the package properly?

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

This doesn't work on my M1 Mac (running Sonoma)...

cc -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 -L/usr/local/lib -losxfuse
ld: warning: ignoring file '/usr/local/lib/libosxfuse.2.dylib': fat file missing arch 'arm64', file has 'unknown,unknown,i386,x86_64'
ld: Undefined symbols:
  _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
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ext4fuse] Error 1

I had to install rosetta to get the compile to go to success:

softwareupdate --install-rosetta

@philippesic
Copy link

philippesic commented May 14, 2024

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make

this is not working for me. I've made sure that fuse is all good, but make command or this gives the error Makefile:2: *** You need to install pkg-config in order to compile this sources. Stop.

anyone know fixes? or have i done something wrong?

EDIT: Installed pkg-config through brew. Upon making : ld: open() failed, errno=21 for 'ext4fuse' clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [ext4fuse] Error 1

@gingerbeardman
Copy link

+1

@udance4ever
Copy link

udance4ever commented Aug 14, 2024

finally got a hold of a M1 MBP and revisiting this. I got this working using the instructions above and happened to do this build after I had squashfuse working so I had a lot of possible shared prerequisites installed (for squashfuse, see build instructions) like autoconf automake pkg-config libtool lzo xz

I'm able to mount an ext4 partition on a 6TB external HDD and copy a bunch of files. Aside from a few permissions issues because some directories do not have world-readable access, it seems to be working on first try!

and just a heads up there is now a kernel extension-less version of fuse floating around there called fuse-t. With the help of the squashfuse developer (his comments on what's involved are great), I was successful compiling squashfuse with fuse-t on a macOS install that does not permit kernel extensions and it worked like a charm. It's very promising that it should be possible to build ext4fuse with fuse-t quite soon 🤞🏼

I also gave the Mounty developer (uses macfuse & ntfs-3g) a heads up as it will be great to add NTFS to this mix!

@jrussell88
Copy link

I was successful compiling squashfuse with fuse-t on a macOS install that does not permit kernel extensions and it worked like a charm
How to build ext4fuse with fuse-t?

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