What are sqlite development headers and how to install them?

大兔子大兔子 提交于 2020-01-01 02:28:15

问题


I am trying to install pysqlite and have troubles with that. I found out that the most probable reason of that is missing sqlite headers and I have to install them.

However, I have no ideas what these headers are (where I can find them, what they are doing and how to install them).

Can anybody, pleas, help me with that?


回答1:


debian/ubuntu:

$ apt-get install libsqlite3-dev # or rpm -i sqlite-devel-something.rpm

I think a number of interpreters just recompile their small connection libraries on installation, but to do that they need the C .h files in addition to the library to link against. You may already have the library, because something else depended on it, but you don't necessarily have the dev package, which is kind of half-way between source and binary.

Part of it is straightforward, if you are going to develop with a library you need its interface headers.

But I think something more happened, at first, people tried all-source and all-binary distributions, but the all-binary ones were vulnerable to dependency hell, and the all-source ones were overkill. I think now that an interesting compromise is in use, a semi-source distribution where a program links to installed libraries by recompiling those parts of it that link to extension libraries. This makes a lot of sense with interpreters where most of the system can arrive in binary but the extension modules are dynamically loaded and compiled for the installed system. I think.




回答2:


For me this worked (Redhat/CentOS):

$ sudo yum install sqlite-devel




回答3:


pysqlite needs to compiled/build before you can use it. This requires C language header files (*.H) which come with the source code of sqllite itself.

i.e. sqllite and pysqlite are two different things. Did you install sqlite prior to trying and build pysqllte ? (or maybe you did, but did you do so just with the binaries; you need the source package (or at least its headers) for pysqlite purposes.



来源:https://stackoverflow.com/questions/1462565/what-are-sqlite-development-headers-and-how-to-install-them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!