findimagedupes icon indicating copy to clipboard operation
findimagedupes copied to clipboard

how to install findimagedupes on macOS?

Open nevertoday opened this issue 2 years ago • 3 comments

I have tried multiple installation schemes, but it cannot be installed on mac, how can I install it correctly?

nevertoday avatar May 23 '22 07:05 nevertoday

Unfortunately, I have no access to Apple products so am unable to advise on the procedure required. Perhaps another user of the program will be able to answer your question here, for future reference.

jhnc avatar May 23 '22 17:05 jhnc

It doesn't matter, I have achieved my purpose by other means. Thank you

nevertoday avatar May 27 '22 02:05 nevertoday

In case it may help, that's what I use on github runners: It uses homebrew on the github runner, but it works also when using macports

          # Some command below use GNU sed
          brew install gnu-sed

          # Dependencies for findimagedupes
          # Graphics::Magick is provided by graphicsmagick
          brew install graphicsmagick

          # Install PerlMagick from GraphicsMagick to have Graphics::Magick
          wget https://netcologne.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.40/GraphicsMagick-1.3.40.tar.xz
          tar -xf GraphicsMagick-1.3.40.tar.xz
          cd GraphicsMagick-1.3.40
          # Configure with the same configure arguments as homebrew, but with "--with-perl=yes"
          ./configure \
            --prefix=/usr/local \
            --disable-dependency-tracking \
            --disable-openmp \
            --disable-static \
            --enable-shared \
            --with-modules \
            --with-quantum-depth=16 \
            --without-lzma \
            --without-x \
            --without-gslib \
            --with-gs-font-dir=/usr/local/share/ghostscript/fonts \
            --without-wmf \
            --with-jxl \
            --with-perl=yes
          cd PerlMagick
          perl Makefile.PL
          make
          sudo make install

          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "File::MimeInfo")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "File::MimeInfo::Magic")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Inline")'
          sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Inline::C")'

          wget https://raw.githubusercontent.com/jhnc/findimagedupes/2.20.1/findimagedupes
          chmod +x findimagedupes
          gsed -i 's#usr/bin/perl#usr/bin/env perl#' findimagedupes
          gsed -i 's#'\''/usr/local/lib/findimagedupes'\''#$ENV{"HOME"}#' findimagedupes
          sudo mv findimagedupes /usr/local/bin

          findimagedupes --help || echo

tenzap avatar Feb 06 '23 11:02 tenzap