SolvedJackett [macOS][10.15] libhostfxr.dylib cannot be opened because Apple can't verify if it contains malware

When opening Jackett in macOS 10.15 Catalina beta 3, an alert pops up saying that libhostfxr.dylib cannot be opened. This is due to a new Gatekeeper policy in Catalina.

image

Here's the error in the Terminal:

Failed to load 1, error: dlopen(/Applications/Jackett/libhostfxr.dylib, 1): no suitable image found.  Did find:
	/Applications/Jackett/libhostfxr.dylib: code signature in (/Applications/Jackett/libhostfxr.dylib) not valid for use in process using Library Validation: Library load disallowed by System Policy
The library libhostfxr.dylib was found, but loading it from /Applications/Jackett/libhostfxr.dylib failed
  - Installing .NET Core prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

Jackett version: 0.11.463 (I'm using the macOS binaries)


26 Answers

✔️Accepted Answer

Found a workaround, but it is extremely unorthodox. The user can still run unchecked dylib/dll files by allowing them manually in Gatekeeper preferences under Security and Privacy. However this has to be done one-by-one and jackett has to be relaunched manually all the time. Here comes the hack: manually setting the quarantine flag of each dylib and dll in the Jackett directory!
Read the quarantine attribute of one dll:

xattr -p com.apple.quarantine libhostfxr.dylib

Copy the string (should be something like 0081;5d1bec70;Archive Utility;0622FF31-4499-4EBA-954A-EDC879E4010A) but replace the first 4 characters by 00c1 which tells Gatekeeper to shut up. Then use your modified string:

xattr -w com.apple.quarantine "00c1;5d1bec70;Archive Utility;0622FF31-4499-4EBA-954A-EDC879E4010A" -- *.{dylib,dll}

This will effectively whitelist all the dll and dylib files, allowing Jackett to run.
I'll file an issue with .NET so that issue can be addressed (involves signing with Xcode which can't really be done for Jackett).

Other Answers:

@punkhop @thebluepotato @rrrevin @protura @orenwolf

There are two tips I used to solve the Jackett malware popup issue.

1) Quarantine removal

The first tip is to remove quarantine flag in a recursive manner for your intended folder:

$ sudo xattr -r -d com.apple.quarantine /path/to/folder

In this case for Jackett use:

$ sudo xattr -r -d com.apple.quarantine /path/to/Jackett

The command will recursively delete the extended attribute (xattr) of com.apple.quarantine attribute recursively to the files in the folder.

The (-r) option will allow the quarantine attribute of all files inside the application to be selected, while the (-d) deletes the extended attribute name.

You can find more information in the extended attributes (xattr) help page:

$ xattr -h

2) Terminal "Privacy"

The second tip is setting the Terminal "privacy".

System Preferences -> Security & Privacy -> Privacy and select "Developer Tools" on the left, and add terminal to allow.

This step allows the Terminal app to run software locally that does not meet the system's security policy.

terminal privacy

Apple Support Reference:

Safely open apps on your Mac

https://support.apple.com/en-us/HT202491

Hi all,

Hope you're well

Just upgraded macOS to Catalina and Jackett is broken because of this...

Screenshot 2019-10-14 at 16 19 42

Screenshot 2019-10-14 at 16 25 38

If I action "Cancel" then dialog just returns every few seconds

I followed [A]pple instructions to open an app from an unidentified developer - neither appear to work

Same or different issue?:

  • If same then OP feel free to update [t]itle and what's fix
  • If different then I'll create a new issue

Yours hopefully

a: https://support.apple.com/en-mt/guide/mac-help/mh40616/mac
t: "Cannot be opened because the developer cannot be verified" and/or "macOS cannot verify that this app is free from malware"

FYI

Copy the string (should be something like 0081;5d1bec70;Archive Utility;0622FF31-4499-4EBA-954A-EDC879E4010A) but replace the first 4 characters by 00c1 which tells Gatekeeper to shut up. Then use your modified string:

xattr -w com.apple.quarantine "00c1;5d1bec70;Archive Utility;0622FF31-4499-4EBA-954A-EDC879E4010A" -- *.{dylib,dll}

This will effectively whitelist all the dll and dylib files, allowing Jackett to run.

This worked for me (i.e. without --):

xattr -w com.apple.quarantine "00c1;5da86185;Vivaldi;C846B94B-F857-4C39-852C-64F687F2FBC3" *.{dylib,dll}

To clarify, who's fault is this (e.g. Apple, jackett dependency or jacket core)?

Hope this helps

Regards

PS @thebluepotato thanks!

More Issues: