Daily Archives: May 6, 2020

1 post

readlink: command not found

I’ve been working on a bunch of projects that involve Python and a decent amount of commands written and issued in terminal. At one point, I was trying to boot up a local server for a web app I was running and kept running into the error “readlink: command not found”. After a ton of searching and attempting to understand what was going on, I was able to find a solution that solved my problem and allowed me to get back on track.

The core of this issue is changes made to your .bash_profile that renders it unreadable or unparseable so you need to jolt it out of that state to allow it to function normally again.

The answer here on Stackoverflow ultimately led to me solving my problem.

It is happens when you just copy the line (below) into the .bash_profile without removing the quotes (‘xxxx’)
export PATH=’/usr/local/bin:$PATH’

To resolve, just run in console:
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

Then, edit again the file removing the quotes:
vim ~/.bash_profile

The terminal commands that I ran locally ended up looking like this

Nicholass-MacBook-Pro:post-covid-19 nicholaspezarro$ export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Nicholass-MacBook-Pro:post-covid-19 nicholaspezarro$ source ~/.bash_profile

Hopefully this helps you out if you’re having this issue!