Cannot open sqlite3 from Git Bash

Hi, I just downloaded Git and SQLite.
I am following exactly what the instructor is doing in the tutorial video on Codeacademy, but cannot get Git to open SQLite.

screenshot_git%20bash

As shown in the screenshot, I have tried both “./sqlite3.exe” and “winpty sqlite3.exe.”
Can someone tell me what is going on and how to fix this?

If your executable is compiled for a windows console then it will not behave well in that console
If you have not placed your executable somewhere on PATH then you will need to type the full path to the executable

You might want to use the same path for both your attempts, in one of them you just wrote the base name.
./ isn’t a “run” command if that’s what you’re thinking, it’s a location, it is your current directory

Thanks…I still do not have a solution for this problem though.

  1. ./ is exactly what the instructor typed on his screen in the tutorial video, and it worked for him…why not on my screen?

  2. What should I type in order to run sqlite3?

This is what you would normally type:

sqlite3

All the rest comes from workarounds, so “should” doesn’t apply to any of it. Should is just the above.

If I was stuck on windows then I would either run it with a windows console. that’s powershell or cmd.exe
or, use msys2, and install sqlite there - git bash exists to host git, for anything else it’s rather silly. still you can use it with enough workarounds, but using such things should come from knowing exactly what you’re doing otherwise you should be getting rid of all that

regarding being stuck on windows, that might at first sound like something you’d want - but making your creations rely on a proprietary operating system that needs to be paid for is not desirable - especially when it isn’t superior in any way

1 Like

powershell/cmd.exe/bash all execute things through the same “command”

typing the path of the executable

So you’d open a terminal. find out where your sqlite3.exe file is. type that path. hit enter.

sqlite does run on windows. the above is sufficent to run sqlite on windows.

If you’re involving anything other than that (for example, winpty) then it’s because you’ve put an obstacle in your way. don’t work around it, remove the obstacle.

and keep in mind that windows will always be bit of an obstacle, it’ll keep sticking its head up because it refuses to do things like how everyone else does it, probably as part of its anticompetitive strategy


it’s silly to teach you how to use workarounds when you should be learning to use the real tool itself.

Many thanks, I was able to open sqlite3 on cmd.exe!
I wonder why I spent like 10 hours over the last 2 days learning about Git Bash:laughing:

In case someone facing the same issue reads this thread, these YouTube videos helped:


bash itself is well worth learning some of, in a sense bash is the equivalent of windows’ mouse pointer. When opening a terminal on a non-windows system, the program reading what you’re typing is likely bash or something very similar

but the configuration of tools that makes up git bash, not so much

if you have access to wsl then that’s probably (never used it) a much better environment because most things that you would care about so far behaves like (or maybe even is, I don’t keep up with/use it) a linux distro, I believe you would for example install and run sqlite like this:

$ apt-get update           # update package index
$ apt-get install sqlite3  # download and install
$ sqlite3                  # ready to go

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.