I'm trying to execute a Unix binary that's installed on a different partition of my SSD, but I keep running into a "Segmentation error". This error usually suggests some kind of incompatibility. When I switch to the partition with a newer version of macOS that has the binary, it runs just fine. I have a theory that the issue might be related to hardcoded paths for dependencies in the binary. Is there any way to get it to use those paths even when I'm operating from a different partition?
1 Answer
It sounds like the issue isn’t specifically about running from another disk. In fact, Unix systems typically don’t have problems executing binaries even from networked drives, let alone just a different partition. If you suspect it's due to hardcoded paths, that normally generates a runtime error like "library not loaded" rather than causing a segfault after running.
Now, if you're rebooting into the newer macOS and the binary works there, that’s like trying to run an app made for Windows 10 on Windows Vista. You have a few solid options:
1. Find an older version of the binary that fits your current macOS.
2. Just reboot into the newer macOS each time you need the binary.
3. Reach out to the software author for help; segfaults can happen if they didn't handle some errors properly.
Trying to fix it otherwise might require a lot more effort than it’s worth and could end up being hacky and unreliable.
Thanks for the detailed response! It's clear now. Also, I’m puzzled as to why my neutral question received downvotes.