coherentgraphics / cpdf-binaries

PDF Command Line Tools binaries for Linux, Mac, Windows
Other
581 stars 42 forks source link

Refused On Mac #70

Closed wangliang1989 closed 1 year ago

wangliang1989 commented 1 year ago

I am on Mac 12.6 ARM The computer refused to run cpdf, and cannot find the "Allow anyway" button anymore in the System Preferences --> Security & Privacy --> General. Below is the screenshots. Although I am using Chinese language, I think you will agree there is no "Allow anyway" button anymore.

823CBD1A8E8F6E0024F107AA3CBC9225

368116A506C20BB43C8ED9545251A4BC

johnwhitington commented 1 year ago

Works for me, in latest MacOS Ventura the option is still there, so it has not been removed:

Untitled

The process was this:

1) I downloaded and ran cpdf. It refused, bringing up a dialog box, and killing the cpdf process 2) I clicked "allow anyway" in settings 3) It failed running cpdf again, but allowed me to click "Ok" on the dialog box 4) Now it succeeds.

Can you try again?

(I have seen it suggested online that the system can be turned off with sudo spctl --master-disable but try it without doing that first.)

wangliang1989 commented 1 year ago

I update the system today, and after the step 1 you show, I cannot find the "allow anyway" button.

image
johnwhitington commented 1 year ago

Very strange. The latest apple guidelines say it should work:

https://support.apple.com/en-gb/guide/mac-help/mh40616/mac

Can you try also the "open" trick mentioned in this link?

If that doesn't work, I think you will have to do sudo spctl --master-disable.

wangliang1989 commented 1 year ago
image
johnwhitington commented 1 year ago

After typing sudo spctl --master-disable, you then need to go back into System Settings, and you should find a new option "anywhere" or similar has appeared. After you choose that, the executable should run:

Untitled
wangliang1989 commented 1 year ago
image

Although it is written in Chinese, I think you can understand.

johnwhitington commented 1 year ago

Did you try clicking ok on the dialog box and then running cpdf again?

wangliang1989 commented 1 year ago

click cancel?

johnwhitington commented 1 year ago

No, you click on Ok. It probably kills cpdf, but then you run cpdf again, and it should work...

wangliang1989 commented 1 year ago

But there is no "OK" button. The blue arrow is "remove to trash". the green arrow is "cancel".

image
johnwhitington commented 1 year ago

Thanks. It is possible that MacOs has "quarantined" this executable - i.e marked it permanently. Can you try deleting it and re-downloading the .zip?

wangliang1989 commented 1 year ago
image
johnwhitington commented 1 year ago

It looks like you downloaded "cpdf-binaries-2.5.1" instead of "cpdf-binaries-master". The codesigning has changed:

Untitled

Change to "master" and click download again.

wangliang1989 commented 1 year ago

Download from this link https://github.com/coherentgraphics/cpdf-binaries/raw/master/OSX-ARM/cpdf can fix this issue