22

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

nbanic
  • 1,270
  • 1
  • 8
  • 11
user1521233
  • 223
  • 1
  • 2
  • 4

4 Answers4

40
$ sudo apt-get install sqlite3
Igor Chubin
  • 61,765
  • 13
  • 122
  • 144
  • 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. – user1521233 Jul 12 '12 at 15:42
  • how do i know if it is enabled? i checked my php.ini couldn't find anything regarding sqlite extension – user1521233 Jul 12 '12 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.

Eric Spreen
  • 341
  • 3
  • 7
7

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
Mendes
  • 17,489
  • 35
  • 150
  • 263
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>

Geoff Langenderfer
  • 746
  • 1
  • 9
  • 21