Setting up SQLite on Mac

I followed the instruction to download SQLite.
Then this command is not working winpty ./sqlite3.exe.
When I list the files in sqlite-tools-osx-x86-3330000 I have sqldiff sqlite3 sqlite3_analyzer
so I tried to do the same without the extension .exe but it didn’t work.
Now I’m in sqlite-tools-osx-x86-3330000 I type sqlite3 I get an error -bash: winpty: command not found.
Also, when I try to cd to one of the files in sqlite-tools-osx-x86-3330000 I get this error -bash: cd: sqlite3: Not a directory even though there are 3 files showing when I ls that directory.
setting up sqlite

Are you on a Mac or on Windows? It seems like you’re attempting to follow the Windows instructions on a Mac (or at least with the Mac download). If you are on a Mac, there should be instructions further down the page in the article you linked to.

Let us know if you need any more help!

1 Like

Seems like you’re right, I’ve been using the windows instructions on a Mac.

So now, I did mv sqlite3 /usr/local/bin/ and then sqlite3 newdb.sqlite and I’m getting this error -bash: winpty: command not found
How do fix that? I’m assuming I need to get rid of that windows command. How would I do that? Is it related to the alias I created in previous step? (echo "alias sqlite3=\"winpty ${PWD}/sqlite3.exe\"" >> ~/.bashrc)

Yes, it’s precisely because of that.
If you go into your files and find the .bashrc file you can edit it and remove the winpty command.
That should do it, I believe.

I found it in my root directory.
It’s a hidden folder. It only shows when I use the connand ls -a.
When I try to cd into it in these ways: cd ./bashrc and also cd .bashrc but I get an error -bash: cd: ./bashrc: No such file or directory.
I tried to google how to access hidden folders.
I found this command to verify the path is correct realpath fileName or
realpath .fileName the erro says command not cound https://askubuntu.com/questions/894489/how-to-access-to-a-hidden-folder.
I can’t seem to find an answer for that.
What would happen if I erase the whole folder bashrc?
Or how would I access this particular folder to try and erase just the winpty?
Thanks

.bashrc should be a file rather than a directory and you should be able to edit it in a standard text editor of your preference.

The warning of “no such file or directory” shouldn’t appear if that file exists, it’d be a warning about it not being a directory instead.

Are you in the same directory as the .bashrc file? If so the correct file path includes the . of .bashrc. So it’d be for example nano .bashrc to edit the file if you’re in the same directory using the nano text editor (for reference your previous command would’ve needed to be cd ./.bashrc where the first . is the current directory and the second one is just part of the name of the file).

If you’re uncomfortable with the command line text editors I believe open -a TextEdit file.txt is still a valid way of opening the basic osx GUI text editor, worth double checking that one though as I don’t have access to OSX at the moment.

3 Likes