Reputation: 81
All of a sudden today Docker on my Mac stopped working with a 'failed to install symlinks"
I tried to get back to a clean state by uninstalling Docker and trying to remove all symlinks in the /usr/local/bin. I'm left with two simlinks docker-compose and docker-machine that I cannot remove even with sudo.
Any suggestion on how to delete those files (that I suspect are the root of the problem) so I can do a clean install?
Not sure if helps but 'Macfee Endpoint security' is running on my Mac.
Upvotes: 6
Views: 6560
Reputation: 1
I had the same issue. I find bin some what messed in /usr/local/bin. I took a backup of /usr/local/bin and deleted it and recreate new directory /usr/local/bin with same permissions. Then it worked.
Upvotes: 0
Reputation: 86
I recently have the same problem on my mac.
I resolved it by changing the owner of /usr/local/bin
by the current user like that:
# sudo chown -R $(whoami) /usr/local/bin
Upvotes: 3
Reputation: 84
I ran into this exact same problem this morning ... but instead of jumping straight into file deletion I restarted my mac and all is well again.
Just saying that more often than not a reboot can fix many problems.
Upvotes: 2
Reputation: 136
This is possibly a broken symlink. Please use this command to find if it’s pointing to an existing parent file:
# ls -lh file
From the output of the command above, if it points to broken parent file, then force the removal of that file first as root:
# rm -rf <broken-referenced-file>
And then unlink the binary symlinks:
# unlink <file>
Also make sure there is no running process related to docker and that no open files are being held by any docker associated process. To get a list of open files do this:
# lsof | grep deleted
# lsof | grep -i docker
# lsof | grep deleted | grep -i docker
Compare the outputs to see if there are any for docker; if so, kill the process using:
# kill -SIGKILL <PID>
And again try unlinking.
Upvotes: 2