Operation not allowed when running Haskell on OS X

I am writing my first Haskell program, a Yesod-based web application.

I compiled the code using cabal configure && cabal build . When I try to run the executable, I get the following error:

 -bash: dist/build/MyApp/MyApp: Operation not permitted 

I installed the 64-bit Haskell platform (2012.2.0.0) on OS X Mountain Lion. I initially installed the 32-bit version, but got the same error, so I uninstalled it and tried the 64-bit version.

The application compiles and links without errors and warnings.

I even tried the fix described in http://reviews.cnet.com/8301-13727_7-57374676-263/workarounds-for-quarantine-bug-in-os-x-lion/ , but that didn't matter.

UPDATE: The plot is thickening. The source tree is actually in an encrypted sparse packet (all my source code). When I copy a tree to my home directory, it compiles and runs .

The mount command does not show the noexec parameter:

 /dev/disk2s9 on /Volumes/Personal (hfs, local, nodev, nosuid, journaled, noowners, quarantine, mounted by grk) 

I'm not sure about the quarantine option, but I suspect that it comes from Symantec Endpoint Protection (required by my employer). I will try to disable it for a sparse package.

+4
source share
1 answer

I found the answer on the sister website apple.stackexchange.com: https://apple.stackexchange.com/questions/64456/mount-is-adding-a-quarantine-flag-causing-bin-bash-bad-interpreter-operatio

A rare bunch is actually marked with the quarantine flag. I disabled the volume and quarantined using the following command:

 xattr -d com.apple.quarantine Personal.sparsebundle 

then remounted. The problem is resolved.

+2
source

Source: https://habr.com/ru/post/1441151/


All Articles