Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mac OS file system sandbox blocked open()

Tags:

macos

dyld

svnx

I've run into

dyld: could not load inserted library '/usr/local/lib/dgagent/libpreload.dylib' because no suitable image found.  Did find:
    file system sandbox blocked open() of '/usr/local/lib/dgagent/libpreload.dylib'

error with several applications - svnX (while trying to import directory, for example), SnailSVN (while trying to run Test during setup). Seems like this file system sandbox blocked open() therefore is not application specific but rather my Mac is missing some settings.

Have anyone encountered the same issue and found the way around it?

like image 904
user2156173 Avatar asked Jun 19 '17 10:06

user2156173


2 Answers

On 10.15 and later, folders like the Desktop, Documents etc. require "Files and Folders access"

Two steps to setup the access:

  1. System Preferences > Security & Privacy > Privacy > Full Disk Access > "add your app such as svnX"

  2. System Preferences > Security & Privacy > Privacy > Files and Folders > "add your app such as svnX"

like image 164
Gentle.Zhang Avatar answered Nov 02 '22 10:11

Gentle.Zhang


The comment from Richard Barber above saved my life. I also faced this issue (although with a different app and a different library) but essentially the same thing. Apple apps run is something called a Sandbox and hence cannot access a lot of locations. I tried adding the access to "Full Disk" and "Files and Folders" as specified in the above answer. I was able to add "Full Disk Access" but the "Files and Folder" thing was greyed out on my app in question (Microsoft Excel). So, that didn't work for me

Finally what worked is taking the entire folder of the library in question (in my case a mysql odbc driver) and copying it over to /Applications/Microsoft Excel.app/Contents/Frameworks/

TL;DR : copy the library in question over to the Frameworks folder in the directory of that application and then the application should be able to access it

like image 21
Megha Mittal Avatar answered Nov 02 '22 11:11

Megha Mittal