Hi,

I had the same error using homebrew. For some reason, sqlite3.pc (pkgconfig) wasn't in usual directory.
I just manually linked it to /usr/lib/pkgconfig:
    ln -s /usr/local/Cellar/sqlite/3.7.15.2/lib/pkgconfig/sqlite3.pc /usr/lib/pkgconfig/sqlite3.pc
Then "opam install sqlite3-ocaml" ran fine.

Sqlite3 was the only package having this problem.

On 28/02/2013 04:14, manu delab wrote:
Hello,

I get the following error when trying to install sqlite3-ocaml:

$ opam install sqlite3-ocaml
The following actions will be performed:
 - install sqlite3-ocaml.2.0.4
1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove

=-=-= Installing sqlite3-ocaml.2.0.4 =-=-=
The archive for sqlite3-ocaml.2.0.4 is in the local cache.
Extracting /Users/manu/.opam/archives/sqlite3-ocaml.2.0.4+opam.tar.gz.
Building sqlite3-ocaml.2.0.4:
  ocaml setup.ml -configure
  ocaml setup.ml -build
  ocaml setup.ml -install
The compilation of sqlite3-ocaml.2.0.4 failed.
Uninstalling sqlite3-ocaml.2.0.4:
  ocamlfind remove sqlite3


==== ERROR [while installing sqlite3-ocaml.2.0.4] ====
# opam-version    0.9.4
# os              darwin
# command         ocaml setup.ml -build
# path            /Users/manu/.opam/system/build/sqlite3-ocaml.2.0.4
# exit-code       1
# env-file        /Users/manu/.opam/system/build/sqlite3-ocaml.2.0.4/sqlite3-ocaml-1872ec.env
# stdout-file     /Users/manu/.opam/system/build/sqlite3-ocaml.2.0.4/sqlite3-ocaml-1872ec.out
# stderr-file     /Users/manu/.opam/system/build/sqlite3-ocaml.2.0.4/sqlite3-ocaml-1872ec.err
### stdout ###
/opt/local/bin/ocamlopt.opt -I /opt/local/lib/ocaml/ocamlbuild unix.cmxa /opt/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /opt/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
Failure: pkg-config failed for cflags.
### stderr ###
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sqlite3' found
E: Failure("Command ''/opt/local/bin/ocamlbuild' lib/libsqlite3_stubs.a lib/dllsqlite3_stubs.so lib/sqlite3.cma lib/sqlite3.cmxa lib/sqlite3.a lib/sqlite3.cmxs -tag debug' terminated with error code 2")

'opam install sqlite3-ocaml' failed.

I am on OSX and I have the following installed with Macports:
  sqlite3 @3.7.10_0
  sqlite3 @3.7.11_0
  sqlite3 @3.7.12.1_0
  sqlite3 @3.7.13_0+universal
  sqlite3 @3.7.14_1+universal
  sqlite3 @3.7.14.1_0+universal
  sqlite3 @3.7.15.2_0
  sqlite3 @3.7.15.2_0+universal (active)

Any idea ? Thanks