ExifTool Forum

ExifTool => Install Problems => Topic started by: rp on March 21, 2019, 01:03:49 PM

Title: Trying to downgrade but newer (uninstalled) version detected
Post by: rp on March 21, 2019, 01:03:49 PM
Hello!

I'm using MacOS High Sierra 10.13.6

I've followed the uninstall instructions to remove ExifTool-11.32 (basically: remove exiftool and the lib folder from /usr/local/bin). I then rebooted.

Now I would like to install an older version of exiftool (ExifTool-10.99). The installer unfortunately detects that a newer version of exiftool already exists: "ExifTool-10.99 can't be installed on this disk. A newer version of this software already exists on this disk."

Please let me know how to completely remove exiftool so that I can downgrade and satisfy an external requirement.

Thank you for reading!
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: Phil Harvey on March 21, 2019, 01:21:49 PM
Why do you want to downgrade?
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: rp on March 21, 2019, 01:44:40 PM
The newer version of exiftool does not work with external code that I need to work with. Specifically this: https://github.com/micasense/imageprocessing

Something is incompatible in the newer version and I need to work around it for now.
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: Phil Harvey on March 21, 2019, 01:52:41 PM
Unlike many other software projects, I am serious about maintaining backward compatibility, so if there is a difference it is likely a bug that needs to be fixed, so more details would be helpful.

You can run any older version of exiftool on MacOS by simply downloading the full distribution (.tar.gz file), unzipping it, and running exiftool from that directory.

To trick the package manager into installing an older version, it seems that you may need to delete the receipt from the package history.  You should find this in your /Library/Receipts folder.

- Phil
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: rp on March 21, 2019, 02:15:26 PM
Thank you. I'll give that a shot. Here are more details on the error:

After following the setup instructions at https://micasense.github.io/imageprocessing/MicaSense%20Image%20Processing%20Setup.html

Running the sample test code gives an error: ImportError: bad magic number in 'exiftool': b'\x03\xf3\r\n'

See below:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-1b6f9d5d2f05> in <module>
      1 import cv2 #openCV
----> 2 import exiftool
      3 import os, glob
      4 import numpy as np
      5 import pyzbar.pyzbar as pyzbar

ImportError: bad magic number in 'exiftool': b'\x03\xf3\r\n'
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: rp on March 21, 2019, 02:50:58 PM
Update: I tried removing all instances of Exiftool from /Library/Receipts/InstallHistory.plist (this is the only place in that directory where ExifTool seems to be).

After restarting, the old pkg installer still detected a newer version and would not install.
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: rp on March 21, 2019, 06:01:35 PM
FYI I don't think you have anything to worry about in terms of backwards compatibility here. I think it was just a complicated issue for me but it seems that the current version of ExifTool will work just fine.

I was never able to get the installer to install the old version, but I've moved on. I appreciate your help and attention nonetheless.
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: Phil Harvey on March 22, 2019, 07:02:39 AM
I'm glad that the new version works for you.

Honestly, I don't know how the MacOS package manager knows or cares about what the older version was.  But I'm glad I don't have to spend time figuring it out.

- Phil
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: wywh on January 26, 2024, 07:11:38 AM
I downgraded exiftool just to test how an older version behaved with one command.

Deleting "exiftool" and "lib" from /usr/local/bin was not enough. Mac ExifTool-12.71.pkg refused to install because a newer version was still detected. This is my test volume so I was free to mess around.

Deleting the contents of /Library/Receipts was not enough.

But deleting com.philharvey.image-exiftool.plist and com.philharvey.image-exiftool.bom from /var/db/receipts did the trick. BTW you can list current installed packages, and delete one with:

pkgutil --pkgs

sudo pkgutil --forget com.philharvey.image-exiftool

- Matti
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: Phil Harvey on January 26, 2024, 07:57:05 AM
Hi Matti,

Interesting, thanks.

But just to run (not install) an older version on Mac you could have downloaded and expanded the .tar.gz distribution then run the old version of "exiftool" from the expanded folder.  I do this a lot myself to test older versions.

- Phil
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: wywh on January 29, 2024, 04:35:53 AM
Quote from: Phil Harvey on January 26, 2024, 07:57:05 AM.tar.gz

Thanks. This works fine: Expand Image-ExifTool-[some old version].tar.gz and go to that folder and run that version by prefixing the command with ./:

Image-ExifTool-12.12 % ./exiftool -ver
12.12
Image-ExifTool-12.12 % exiftool -ver
12.74

- Matti
Title: Re: Trying to downgrade but newer (uninstalled) version detected
Post by: Phil Harvey on January 29, 2024, 06:55:18 AM
Hi Matti,

You don't have to cd to the folder.  Running Image-ExifTool-12.12/exiftool will run the alternate version.

- Phil