24

I need to install SQLite on my Debian VPS server. Can someone help me out? Kindly give me steps because I'm a newbie here and have no idea.

Thank you

4 Answers 4

41
$ sudo apt-get install sqlite3
2
  • 1
    hi, i try sudo apt-get install sqlite3 but gave me command not found error so i try apt-get install sqlite3 and i saw some activities on my putty i hope this is a success. Commented Jul 12, 2012 at 15:42
  • how do i know if it is enabled? i checked my php.ini couldn't find anything regarding sqlite extension Commented Jul 12, 2012 at 15:54
10

I understand from your comments above that you wish to use sqlite with PHP. Although this is an old question, here is how to do it for future reference.

PHP can communicate with SQLite databases with the help of the pdo-sqlite extension. On the current Debian, you need to install the package php5-sqlite. This will install and activate the module in your php.ini:

sudo aptitude install php5-sqlite

You can communicate with SQLite databases from the command line with the tools provided in the package sqlite or sqlite3. You can install these similarly. Note that these tools do not provide any PHP extensions.

1
  • 1
    the php5-sqlite3 package doesn't exist anymore, it is now php-sqlite3.
    – Timo
    Commented Jan 13, 2022 at 7:56
8

If you want to install SQLite3 only (in your case, at the server):

$ sudo apt-get install sqlite3

If you need the development packages (to build programs based on sqlite3 libraries):

$ sudo apt-get install libsqlite3-dev

For PHP usage:

$ sudo apt-get install php5-sqlite3
1
  • 1
    In Debian 10 the generic package is php-sqlite3
    – Rickyx
    Commented Mar 3, 2020 at 14:56
1

with linuxbrew on Linux Mint, do:

brew install sqlite
sudo cp /home/linuxbrew/.linuxbrew/opt/sqlite/bin/sqlite3 /usr/bin

which results in:

➜  kata_tdd_php_symfony git:(master) ✗ sqlite3
SQLite version 3.30.1 2019-10-10 20:19:45
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.