Announcement: Upgrade to macOS Mojave

With features like Dark Mode, Stacks, and four new built-in apps, macOS Mojave helps you get more out of every click. 
Find out how to upgrade to macOS Mojave > https://support.apple.com/macos/mojave

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: Can't run unix executable

I've tried running cpdf, but it quits on opening.


I get error -67062 when it quits.


I also get errors -67050 and unix error exception 17 all the time.


I ran disk utility.


What are these errors, and what can I do about them?

MacBook Air (11-inch Mid 2013), macOS Sierra (10.12.6)

Posted on

Reply
Question marked as Helpful

Dec 16, 2017 10:40 AM in response to Marja E In response to Marja E

The Coherent PDF application (cpdf) was written/compiled in Objective CAML (ocaml), and I suspect these higher error numbers are originating from that ocaml runtime. The last build of cpdf was on 1st Sept 2017, and there is no telling if it is compatible with Sierra or High Sierra. Review the Coherent online manual to ensure that you are using this command-line utility in its prescribed manner. Any command-line argument outside of the application's expectations could cause it to crash with those error codes.


I suggest contacting the developer with these error codes for further revelation of the cause.

Question marked as Helpful

Dec 16, 2017 12:49 PM in response to Marja E In response to Marja E

The Finder supports Bash scripts whose extension is .command, instead of .sh. You can double-click that .command file, and it will open a new Terminal window, and run the contents of the Bash script, and then quit. Ordinarily, that is the extent of it. No user interaction.


However, using osascript, one can add user interactivity via AppleScript within the .command file, and provide the results of that interaction as variables to the underlying Bash script. Would that help you, assuming that cPDF was willing to not generate errors? 😉

There’s more to the conversation

Read all replies
Question marked as Helpful

Dec 16, 2017 10:40 AM in response to Marja E In response to Marja E

The Coherent PDF application (cpdf) was written/compiled in Objective CAML (ocaml), and I suspect these higher error numbers are originating from that ocaml runtime. The last build of cpdf was on 1st Sept 2017, and there is no telling if it is compatible with Sierra or High Sierra. Review the Coherent online manual to ensure that you are using this command-line utility in its prescribed manner. Any command-line argument outside of the application's expectations could cause it to crash with those error codes.


I suggest contacting the developer with these error codes for further revelation of the cause.

Dec 16, 2017 10:40 AM

Reply Helpful (1)

Dec 16, 2017 10:43 AM in response to VikingOSX In response to VikingOSX

Thanks. I was trying to run it like k2pdfopt-- by double-clicking on the finder, having it open its own terminal window, and then hopefully typing my settings in that window. It's not designed that way. I can't make heads or tails of the manual though.

Dec 16, 2017 10:43 AM

Reply Helpful
Question marked as Helpful

Dec 16, 2017 12:49 PM in response to Marja E In response to Marja E

The Finder supports Bash scripts whose extension is .command, instead of .sh. You can double-click that .command file, and it will open a new Terminal window, and run the contents of the Bash script, and then quit. Ordinarily, that is the extent of it. No user interaction.


However, using osascript, one can add user interactivity via AppleScript within the .command file, and provide the results of that interaction as variables to the underlying Bash script. Would that help you, assuming that cPDF was willing to not generate errors? 😉

Dec 16, 2017 12:49 PM

Reply Helpful (1)

Dec 16, 2017 3:04 PM in response to Marja E In response to Marja E

In the past, did we talk about the Skim PDF viewer, and its command-line component that can merge PDF, or extract ranges of PDF pages into an output PDF? This tool is inside the Skim application, and to use it on the command-line, one makes a UNIX soft link from the application into a folder location in their default (/usr/local/bin) search path. It may, or may not be as robust as cPDF.


skim help


Usage:

skimpdf embed IN_PDF_FILE [OUT_PDF_FILE]

skimpdf unembed IN_PDF_FILE [OUT_PDF_FILE]

skimpdf merge IN_PDF_FILE_1 IN_PDF_FILE_2 [OUT_PDF_FILE]

skimpdf extract IN_PDF_FILE [OUT_PDF_FILE] [-range START [LENGTH] | -page PAGE1... | -odd | -even]

skimpdf help [VERB]

skimpdf version

SkimPDF command-line client, version 1.1.6

Dec 16, 2017 3:04 PM

Reply Helpful

Dec 16, 2017 3:40 PM in response to VikingOSX In response to VikingOSX

I've found that different pdf-reformatting tools don't work well together. So if I use MuPdf and Quartz on the same file, it gets very blurry. In Sierra or High Sierra, I can't just use Quartz because it won't convert all the images any more. I often get better results with k2pdfopt which uses MuPdf, especially with scans from the Internet Archive or Google Books.


I sometimes split pdfs to reformat them in k2pdfopt, which uses MuPdf, and I want to be able to merge them back without re-reformatting them with Quartz. I haven't tested, but I think Skim would re-reformat them with Quartz.

Dec 16, 2017 3:40 PM

Reply Helpful
User profile for user: Marja E

Question: Can't run unix executable