'Permission denied' when moving sqlite3 on Mac

Hi all,

I wanted to use SQLite on my Mac as described here under the following link:

https://www.codecademy.com/paths/data-science/tracks/analyze-data-sql-go-off-platform/modules/analyze-data-sql-learn-off-platform/articles/what-is-sqlite

Under the description Mac OS X, I am struggling with step 3 of the list: Moving the sqlite3 file to /usr/local/bin/.
In the Terminal, the message ‘Permission denied’ is returned.

Anybody knows what I can do? (I am a beginner using the command line).

Kind regards

1 Like

you can start by checking the permission of the directory:

ls -l path

with the right path of course, then if needs be, give yourself additional privileges.

2 Likes

Uh. Arguably you shouldn’t be trying to put it there in the first place.
Put it in ~/bin and make sure ~/bin is in your $PATH, some os’s add ~/bin to $PATH for you, otherwise do it yourself.

Or don’t move it anywhere and run it from where you already have it

1 Like

I will try it…
Thank you

Why does the text on the page say to put it there in the first place?

I’d have to guess but maybe something like “oh look there are executables here let’s put our program here too”
But the sqlite you are installing isn’t a system component, it doesn’t belong there, it’s more of a user script and so it belongs in the users set of programs. Idk abouc mac but linux distros also have directories /usr/local/{bin,etc,share,lib,include,man} and /opt for the purpose of non-system-owned system-wide installations where things can be placed without interference in either direction. It’s a personal executable, so, ~/bin is where I think it belongs.

Hey! Had same issue, just done it manually via finder. Worked for me! Good luck!
P.S. I guess that it is some kind of Mac Security rule for later versions of OS.

Almost any multi-user os denies write permission to system-owned directories

Thanks to all! Tried it out manually and it is working now.

Kind regards!

If anybody else comes across this thread and is struggling to get SQLite up and running, use the command sudo mv sqlite3 /usr/local/bin/ to bypass the permissions problem.