Discussion:
Installing SQLite
Dan M. Wall
2009-03-03 15:48:02 UTC
Permalink
I am an experienced Windows user and application developer. I am now attempting to actually use a Mac!! God forbid!!

I have an SQLite database and I'm trying to figure out how to install SQLite so I can view it and update it. I downloaded the bin files but I'm obviously missing something.

Please forgive my Mac OSX ignorance! Any help you can provide would be greatly appreciated!

Dan
P Kishor
2009-03-03 15:50:42 UTC
Permalink
I am an experienced Windows user and application developer.  I am now attempting to actually use a Mac!!  God forbid!!
Welcome to sanity. Don't worry, you will get used to it.
I have an SQLite database and I'm trying to figure out how to install SQLite so I can view it and update it.  I downloaded the bin files but I'm obviously missing something.
step 1. Download the source.
step 2. type /.configure followed by make && make install
step 3. there is no step 3.
Please forgive my Mac OSX ignorance!  Any help you can provide would be greatly appreciated!
Dan
--
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from: Madison WI United States.
Nikolas Stevenson-Molnar
2009-03-03 17:24:29 UTC
Permalink
Mac OS X also comes with SQLite; just open up the Terminal app and
perform: sqlite3 <dbname>

_Nik
Post by P Kishor
Post by Dan M. Wall
I am an experienced Windows user and application developer. I am
now attempting to actually use a Mac!! God forbid!!
Welcome to sanity. Don't worry, you will get used to it.
Post by Dan M. Wall
I have an SQLite database and I'm trying to figure out how to
install SQLite so I can view it and update it. I downloaded the
bin files but I'm obviously missing something.
step 1. Download the source.
step 2. type /.configure followed by make && make install
step 3. there is no step 3.
Post by Dan M. Wall
Please forgive my Mac OSX ignorance! Any help you can provide
would be greatly appreciated!
Dan
--
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from: Madison WI United States.
_______________________________________________
sqlite-users mailing list
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Peter ZhaoKai
2009-03-03 16:39:05 UTC
Permalink
http://www.sqlite.org/cvstrac/wiki?p=HowToCompile
For compile on windows, Cygwin could be used, see cygwin section.
Jay A. Kreibich
2009-03-03 17:19:30 UTC
Permalink
Post by Dan M. Wall
I am an experienced Windows user and application developer. I am now
attempting to actually use a Mac!! God forbid!!
I have an SQLite database and I'm trying to figure out how to install
SQLite so I can view it and update it. I downloaded the bin files
but I'm obviously missing something.
Mac OS X 10.5 already has SQLite 3.4.0 installed. That's not exactly
new, but if all you need to do is open a vanilla file and poke
around, you could do OK.

I assume you've already found /Applications/Utilities/Terminal.app,
and are working in the command line.

You should be able to use the installed "/usr/bin/sqlite3" shell by just
issuing the command:

$ sqlite3 <database name>



If you need to install a newer version, make sure you've got the full
Development tools installed. You don't need the IDE for SQLite, but
you need the compilers.

If you download and unpack the amalgamation source, you can just
issue the command:

$ cc -o sqlite3 sqlite3.c shell.c

And that will build the sqlite3 binary. And any defines (-D), like
SQLITE_ENABLE_FTS, that you might require:

$ cc -DSQLITE_ENABLE_FTS -DSQLITE_ENABLE_RTREE -o sqlite3 sqlite3.c shell.c
Post by Dan M. Wall
Please forgive my Mac OSX ignorance! Any help you can provide would be
greatly appreciated!
Unless you're doing desktop stuff with XCode, developing for Mac OS X
is really about developing for UNIX. OS X has a more BSD flavor than
Linux, but knowledge is generally somewhat cross-compatible.

-j
--
Jay A. Kreibich < J A Y @ K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs. We have
a protractor." "I'll go home and see if I can scrounge up a ruler
and a piece of string." --from Anathem by Neal Stephenson
William Kyngesburye
2009-03-03 19:01:44 UTC
Permalink
Nothing wrong with Macs ;)

As others have pointed out, OSX includes Sqlite, though a bit old.
Also note that extension loading is disabled in this version.

If you don't want to mess with installing Xcode, and want an up to
date and feature-packed Sqlite installer, try my Sqlite framework. It
includes most extra features available in the source, plus the
Spatialite extension. Though it's made for building other
applications with Sqlite support, the sqlite program is included (for
use in Terminal.app).
Post by Dan M. Wall
I am an experienced Windows user and application developer. I am
now attempting to actually use a Mac!! God forbid!!
I have an SQLite database and I'm trying to figure out how to
install SQLite so I can view it and update it. I downloaded the bin
files but I'm obviously missing something.
Please forgive my Mac OSX ignorance! Any help you can provide would
be greatly appreciated!
Dan
_______________________________________________
sqlite-users mailing list
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin
BareFeet
2009-03-03 22:04:42 UTC
Permalink
Hi Dan,
Post by Dan M. Wall
I am an experienced Windows user and application developer. I am
now attempting to actually use a Mac!! God forbid!!
I have an SQLite database and I'm trying to figure out how to
install SQLite so I can view it and update it. I downloaded the bin
files but I'm obviously missing something.
As others have mentioned, SQLite 3.40 is already installed as part of
Mac OS X and drives half of the applications on the platform.

As other have pointed out, you can install the Mac OS X developer
tools and compile/make the SQLite source code.

In answer to your question about the .bin pre-compiled SQLite command
line tool download from the SQLite web site, you need to:

1. Download it.
2. Rename it to "sqlite3" (no .bin extension, which I think shouldn't
be there since it's confused with being a MacBinary file).
3. Move it to a location where you want to run it. Somewhere like /usr/
local/bin/sqlite3. Do NOT replace the sqlite3 that is installed in the
system /usr/bin/sqlite3.

I have a list of SQLite GUI apps for Mac OS X here:
http://www.tandb.com.au/sqlite/compare/?ml

Tom
BareFeet
D. Richard Hipp
2009-03-03 22:18:45 UTC
Permalink
Post by BareFeet
In answer to your question about the .bin pre-compiled SQLite command
1. Download it.
2. Rename it to "sqlite3" (no .bin extension, which I think shouldn't
be there since it's confused with being a MacBinary file).
I did not know that. I'll make a note to adjust the name in the next
release.
Post by BareFeet
3. Move it to a location where you want to run it. Somewhere like /
usr/
local/bin/sqlite3. Do NOT replace the sqlite3 that is installed in the
system /usr/bin/sqlite3.
Another issue, that I only discovered two days ago, is that binaries
compiled for Leopard (OS 10.5) will only run on Leopard and not older
OS X systems. And the precompiled shell found on the website is
compiled on Leopard (which is all I have at hand.) So downloading and
running the pre-compiled shell will not work unless you have the
latest Mac OS. I don't know how to fix this problem. Probably in the
next release we will just label the binaries as "Leopard or later only".

D. Richard Hipp
drh-***@public.gmane.org
William Kyngesburye
2009-03-03 22:29:07 UTC
Permalink
Post by D. Richard Hipp
Another issue, that I only discovered two days ago, is that binaries
compiled for Leopard (OS 10.5) will only run on Leopard and not older
OS X systems. And the precompiled shell found on the website is
compiled on Leopard (which is all I have at hand.) So downloading and
running the pre-compiled shell will not work unless you have the
latest Mac OS. I don't know how to fix this problem. Probably in the
next release we will just label the binaries as "Leopard or later only".
D. Richard Hipp
The default deployment target on Leopard is Leopard. On earlier
systems it's 10.3 (or 10.2?). To get a Tiger-compatible Sqlite built
on Leopard:

export MACOSX_DEPLOYMENT_TARGET=10.4
export CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/
MacOSX10.4u.sdk"

then configure as you normally would.

If you have the 10.3 SDK installed, you could go as far back as 10.3
deployment+SDK.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those
least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy
Loading...