LINUX编译时缺少头文件,查找依赖库的终极解决办法

简介: LINUX编译时缺少头文件,查找依赖库的终极解决办法

  在LINUX上编译,经常缺少头文件。如果不知道哪个库,就要上网搜索。有时很快找到,有时找不到。有没有一个彻底的解决办法?有。

  • 安装并更新
apt install apt-file
apt update
  • 报错
src/switch_core.c:54:10: fatal error: sqlite3.h: 没有那个文件或目录
 #include <sqlite3.h>
  • 需要什么库
root@freeswitch:/home/quantum6/freeswitch# apt-file search sqlite3.h
aolserver4-nssqlite3: /usr/share/doc/aolserver4-nssqlite3/nssqlite3.html
autoconf-archive: /usr/share/doc/autoconf-archive/html/ax_005flib_005fsqlite3.html
cl-sql: /usr/share/doc/cl-sql/html/sqlite3.html
db5.3-doc: /usr/share/doc/db5.3-doc/api_reference/C/sqlite3.html
db5.3-doc: /usr/share/doc/db5.3-doc/api_reference/CXX/sqlite3.html
emscripten: /usr/share/emscripten/tests/sqlite/sqlite3.h
erlang-p1-sqlite3: /usr/lib/erlang/lib/p1_sqlite3-1.1.5/include/sqlite3.hrl
erlang-sqlite3: /usr/lib/erlang/lib/sqlite3-1.1.4~dfsg0/include/sqlite3.hrl
glusterfs-common: /usr/include/glusterfs/gfdb/gfdb_sqlite3.h
hhvm-dev: /usr/include/hphp/runtime/ext/sqlite3/ext_sqlite3.h
libbotan-2-dev: /usr/include/botan-2/botan/sqlite3.h
libghc-haskelldb-hdbc-sqlite3-doc: /usr/lib/ghc-doc/haddock/haskelldb-hdbc-sqlite3-2.1.2/haskelldb-hdbc-sqlite3.haddock
libghc-hdbc-sqlite3-doc: /usr/lib/ghc-doc/haddock/hdbc-sqlite3-2.3.3.1/HDBC-sqlite3.haddock
libmstoolkit-dev: /usr/include/libmstoolkit/sqlite3.h
libsoci-dev: /usr/include/soci/sqlite3/soci-sqlite3.h
libspatialite-dev: /usr/include/spatialite/sqlite3.h
libsqlcipher-dev: /usr/include/sqlcipher/sqlite3.h
libsqlite3-dev: /usr/include/sqlite3.h
libtsk-dev: /usr/include/tsk/auto/sqlite3.h
libwxsqlite3-3.0-dev: /usr/include/wx-3.0/wx/wxsqlite3.h
lisaac-common: /usr/share/lisaac/lib/unstable/sqlite-binding/sqlite3.h
lua-dbi-sqlite3-dev: /usr/include/lua5.1/lua-dbi-sqlite3.h
lua-sql-sqlite3-dev: /usr/include/lua5.1/lua-sql-sqlite3.h
lua-sql-sqlite3-dev: /usr/include/lua5.2/lua-sql-sqlite3.h
lua-sql-sqlite3-dev: /usr/include/lua5.3/lua-sql-sqlite3.h
nim-doc: /usr/share/doc/nim-doc/html/sqlite3.html
php-doc: /usr/share/doc/php-doc/html/book.sqlite3.html
php-doc: /usr/share/doc/php-doc/html/intro.sqlite3.html
python-flask-doc: /usr/share/doc/python-flask-doc/html/patterns/sqlite3.html
python-pysqlite2-doc: /usr/share/doc/python-pysqlite2-doc/html/sqlite3.html
python2.7-doc: /usr/share/doc/python2.7/html/library/sqlite3.html
python3.5-doc: /usr/share/doc/python3.5/html/library/sqlite3.html
python3.6-doc: /usr/share/doc/python3.6/html/library/sqlite3.html
python3.7-doc: /usr/share/doc/python3.7/html/library/sqlite3.html
qtcreator-dev: /usr/src/qtcreator/src/libs/3rdparty/sqlite/sqlite3.h
r-cran-rsqlite: /usr/lib/R/site-library/RSQLite/include/sqlite3.h
salt-doc: /usr/share/doc/salt/html/ref/modules/all/salt.modules.sqlite3.html
salt-doc: /usr/share/doc/salt/html/ref/pillar/all/salt.pillar.sqlite3.html
salt-doc: /usr/share/doc/salt/html/ref/sdb/all/salt.sdb.sqlite3.html
salt-doc: /usr/share/doc/salt/html/ref/states/all/salt.states.sqlite3.html
sqlite3-doc: /usr/share/doc/sqlite3-doc/c3ref/sqlite3.html
thunderbird-dev: /usr/include/thunderbird/sqlite3.h
  • 安装
apt install libsqlite3-dev
目录
相关文章
|
24天前
|
安全 Linux vr&ar
Linux的动态库和静态库
Linux的动态库和静态库
|
9天前
|
Linux
用clang编译Linux内核
用clang编译Linux内核
|
30天前
|
监控 机器人 Unix
GoLand——windows下如何编译Linux二进制文件
GoLand——windows下如何编译Linux二进制文件
28 1
GoLand——windows下如何编译Linux二进制文件
|
15天前
|
Linux C语言
深度探索Linux操作系统 —— 编译过程分析
深度探索Linux操作系统 —— 编译过程分析
14 2
|
22天前
|
Linux API
在Linux中,程序产生了库日志虽然删除了,但磁盘空间未更新是什么原因?
在Linux中,程序产生了库日志虽然删除了,但磁盘空间未更新是什么原因?
|
25天前
|
Ubuntu Linux Windows
如何在WSL中的ubuntu编译Linux内核并且安装使用ebpf?
请注意,在WSL1中可能会由于内核架构限制而无法成功进行以上过程,WSL2对于Linux内核的完整支持更为合适。此外,部分步骤可能因不同的Linux发行版或内核版本而异。
30 4
|
30天前
|
缓存 安全 Linux
本地YUM源大揭秘:搭建您自己的Linux软件宝库,从此告别网络依赖!一文掌握服务器自给自足的终极技能!
【8月更文挑战第13天】在Linux中,YUM是一款强大的软件包管理工具,可自动处理依赖关系。为适应离线或特定安全需求,本指南教你搭建本地YUM源。首先创建存放软件包的`localrepo`目录,复制`.rpm`文件至其中。接着,安装并运用`createrepo`生成仓库元数据。随后配置新的`.repo`文件指向该目录,并禁用GPG检查。最后,清理并重建YUM缓存,即可启用本地YUM源进行软件搜索与安装,适用于网络受限环境。
61 3
|
2月前
|
Oracle 关系型数据库 Linux
讲解linux下的Qt如何编译oracle的驱动库libqsqloci.so
通过这一连串的步骤,可以专业且有效地在Linux下为Qt编译Oracle驱动库 `libqsqloci.so`,使得Qt应用能够通过OCI与Oracle数据库进行交互。这些步骤适用于具备一定Linux和Qt经验的开发者,并且能够为需要使用Qt开发数据库应用的专业人士提供指导。
73 1
讲解linux下的Qt如何编译oracle的驱动库libqsqloci.so
|
18天前
|
Linux 网络安全 API
【Azure 应用服务】App Service For Linux 环境中,如何从App Service中获取GitHub私有库(Private Repos)的Deploy Key(RSA key)呢?
【Azure 应用服务】App Service For Linux 环境中,如何从App Service中获取GitHub私有库(Private Repos)的Deploy Key(RSA key)呢?
|
22天前
|
小程序 Linux 开发者
Linux之缓冲区与C库IO函数简单模拟
通过上述编程实例,可以对Linux系统中缓冲区和C库IO函数如何提高文件读写效率有了一个基本的了解。开发者需要根据应用程序的具体需求来选择合适的IO策略。
22 0