0

I am trying to get minizinc working with my node.js app.

I followed the instructions at https://www.npmjs.com/package/minizinc but errors state that minizinc was not found.

I understood that the above install was just a wrapper for the actual program. I am on hosted on a FreeBSD server, which has advice for installing minizinc here https://freebsd.pkgs.org/12/freebsd-amd64/minizinc-2.5.5.txz.html and here https://docs.freebsd.org/en/books/handbook/ports/ but pkg install or pkg search wouldn't work with the error pkg: Impossible to open / pkg: Cannot parse configuration file!

My hosting service then prompted me this, which seemed to work get everything installed.

wget https://github.com/MiniZinc/libminizinc/archive/refs/tags/2.5.5.zip
unzip 2.5.5.zip 
cd libminizinc-2.5.5/
mkdir build
cd build/
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

The issue now is minizinc is not recognized as a CLI command in any folder and is still not found when attempting to run it in node.

Wrote back to the hosting service and the guy replied with I propose to create a symbolic link (ln -s) of the binaries to the ~/bin/ directory which of course didn't anything to me and after typing in ls -s minizinc ~/bin/ I get this printed but it doesn't seem to have done anything.

4012 minizinc

/home/michael/bin/:
total 2
1 node 1 npm

Before I write back to him, the guy who I am paying for the service who barely seems bothered to talk someone who clearly doesn't know what they're doing through the situation, I thought I would ask here.

Thanks!

MikeyB
  • 460
  • 1
  • 6
  • 22
  • I sounds like you just have to add the directory with the executable to your `PATH` environment variable or install it to such location. `cmake --build . --target install` could install it to the right location if required. Note some of MiniZinc's internal features depend on Solver interfaces that you do not seem to be referring to. – Dekker1 Jun 26 '21 at 00:25
  • Yes, I've been through a lot since my post yesterday. Realised I needed Gecode, so pulled the gecode-release-6.2.0.zip and went through all the rigmarole of using gmake instead of make and deleting and reinstalling, setting prefixes and not, and finally configured it with minizinc and the gecode.msc file, with paths that worked, and now I get this error: `ld-elf.so.1: /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.21 required` Is it to do with my install or the FreeBSD shared public server I'm on? – MikeyB Jun 26 '21 at 08:30

0 Answers0