sgan81 / apfs-fuse

FUSE driver for APFS (Apple File System)
GNU General Public License v2.0
1.78k stars 164 forks source link

'Unable to locate package' erorr while trying to install #149

Open quantumgolem opened 3 years ago

quantumgolem commented 3 years ago

When I try to install this on my Linux OS, I get the following error:

$ sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc-c++ git libattr1-dev zlib1g-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libfuse3-dev
E: Unable to locate package gcc-c+
E: Couldn't find any package by regex 'gcc-c+'

What am I doing wrong?

quantumgolem commented 3 years ago

@Aayush9029 thank you for your comment! I ran all of the commands, but now when I run the install line in the original instructions, I get the following error:

sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc-c++ git libattr1-dev zlib1g-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libfuse3-dev
E: Unable to locate package gcc-c+
E: Couldn't find any package by regex 'gcc-c+'

And when I try to install anyway, I get an error on the last make command:

make

[ 64%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/GptPartitionMap.cpp.o
[ 66%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/KeyMgmt.cpp.o
[ 68%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/PList.cpp.o
[ 70%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/Sha1.cpp.o
[ 72%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/Sha256.cpp.o
[ 75%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/TripleDes.cpp.o
[ 77%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/Util.cpp.o
/home/user/apfs-fuse/ApfsLib/Util.cpp:37:10: fatal error: bzlib.h: No such file or directory
 #include <bzlib.h>
          ^~~~~~~~~
compilation terminated.
CMakeFiles/apfs.dir/build.make:734: recipe for target 'CMakeFiles/apfs.dir/ApfsLib/Util.cpp.o' failed
make[2]: *** [CMakeFiles/apfs.dir/ApfsLib/Util.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/apfs.dir/all' failed
make[1]: *** [CMakeFiles/apfs.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
lucasgabmoreno commented 3 years ago

Same problem here, I've installed @Aayush9029 method but:

-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/home/lucasgabmoreno/apfs-fuse/build/CMakeFiles/CMakeOutput.log".
See also "/home/lucasgabmoreno/apfs-fuse/build/CMakeFiles/CMakeError.log".
aikhan commented 2 years ago

Same problem

memorypuzzler commented 2 years ago

I have exactly the same problem. get the message:

E: Unable to locate package gcc-c+

ssonkokevin commented 2 years ago

same problem

lucasgabmoreno commented 2 years ago

Instead of gcc-c++ I could install clang in Debian 11

sudo apt install clang -y

Now I have this alerts:

[ 16%] Built target lzfse
[ 18%] Building CXX object CMakeFiles/apfs.dir/ApfsLib/Util.cpp.o
/home/lucasgabmoreno/apfs-fuse/ApfsLib/Util.cpp:37:10: fatal error: bzlib.h: No existe el fichero o el directorio
   37 | #include <bzlib.h>
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/apfs.dir/build.make:446: CMakeFiles/apfs.dir/ApfsLib/Util.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:217: CMakeFiles/apfs.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
devgregw commented 2 years ago

On Ubuntu 22.04, I was able to compile everything after replacing gcc-c++ in the command with gcc and g++.

lucasgabmoreno commented 2 years ago

sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc-c++ git libattr1-dev zlib1g-dev

Hi @devgregw! Can you please share us step by step?

Thanks!

devgregw commented 2 years ago

@lucasgabmoreno my full installation command was sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev. After that, I followed the rest of the instructions without any other changes

lucasgabmoreno commented 2 years ago

sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev

@devgregw Thanks!!!

This works on Linux Mint Debian Edition 5 !!!

Your fix:

sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev

Same:

git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update

Same:

mkdir build
cd build
cmake ..
ccmake . # Only if you want to change build options
make

My fix:

sudo cp apfs-* /usr/bin/
sudo cp apfsutil /usr/bin/