2.5.5 won't run from command line on Mac

113 views
Skip to first unread message

Andrew Sturges

unread,
Jul 18, 2021, 10:24:25 PM7/18/21
to MiniZinc
Hi, I'm trying to install and run Minizinc for the first time, so please excuse novice questions. I'm running MacOS 11.4 (20F71), and I installed Minizinc 2.5.5 (273051464) from the binaries. The IDE works fine, and I can run the minizinc application and solve programs.

However, if I try it from the command line, it just hangs forever. Even running `minizinc --version` hangs, like it cannot even initialize the program. I've tried uninstalling and reinstalling. My next idea  is to try to installing from source, but I wanted to post here first, since this seems like a fundamental issue. Thank you,
--Andrew

Jip J. Dekker

unread,
Jul 18, 2021, 11:07:19 PM7/18/21
to MiniZinc
Hi Andrew,

I'm not sure what is going wrong. MiniZinc is extensively tested and used on MacOS (on command line)  so although your problem sounds serious. It is not a fundamental with MiniZinc on the MacOS operating system. 

Looking at the version number, your build does not seem to match the official MiniZinc build: 
MiniZinc to FlatZinc converter, version 2.5.5, build 273041792
How are you using MiniZinc from the command line? Did you install the official MiniZinc bundle and have you then added the bundles binary to you executable PATH?
export PATH=/Applications/MiniZincIDE.app/Contents/Resources:$PATH

Or if you are using Homebrew, did you install the cask for the MiniZinc bundle using the following command?
brew install --cask minizincide

Note that using the "minizinc" formula in Homebrew uses a differently compiled version of the MiniZinc compiler.

Cheers,
Jip

Andrew Sturges

unread,
Jul 28, 2021, 3:57:37 AM7/28/21
to mini...@googlegroups.com

I tried installing via homebrew, and ran into the same trouble. However, here's what I ultimately found as a workaround. If at the command line I navigate to the directory containing the minizinc binary, then I can run it only if I prepend `sudo`. If I install binaries from the web site, then I have to be anywhere inside the /Applications/MiniZincIDE.app/ folder.

If I install from homebrew, then `which minizinc` returns `/usr/local/bin/minizinc`. `minizinc --version` hangs, and `sudo minizinc --version` hangs. `sudo /usr/local/bin/minizinc --version` hangs, but if I cd into /usr and then run `sudo ./local/bin/minizinc --version` it works.

Is this the intended behavior? Could it have something to do with the error message I get along the lines of "This app is from an untrusted developer; are you sure you want to open it?" Thank you,
--Andrew

--
You received this message because you are subscribed to a topic in the Google Groups "MiniZinc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/minizinc/JlLJumb3bDY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to minizinc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minizinc/de564d32-822f-4dd3-b9ff-adb5615e8b7fn%40googlegroups.com.

Jip J. Dekker

unread,
Jul 29, 2021, 1:52:22 AM7/29/21
to mini...@googlegroups.com
Hi Andrew,

It does indeed sound like you are running into the system protection. MacOS will block the execution of any downloaded executable until it is trusted. Once it the executable is marked as trusted, then it will be able to function as normal (it will be trusted the next time as well).

Cheers,
– Jip


Reply all
Reply to author
Forward
0 new messages