首頁  >  問答  >  主體

無法從原始碼建立 PHP 8.0.19 - 沒有套件“sqlite3”;成立

我使用的是 Ubuntu 22.04 LTS。


我嘗試從原始碼建立 PHP 8.0.19。我是從這裡下載的。

我在呼叫 ./configure 後得到這個

checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:

No package 'sqlite3' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

sqlite3 --version 的輸出:

3.37.2 2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5dalt1

所以我嘗試在沒有sqlite3的情況下進行配置

./configure --without-sqlite3

但我仍然遇到同樣的錯誤。

如果我嘗試使用 apt-get update && apt-get install sqlite3 安裝 sqlite3 我得到:

sqlite3 is already the newest version (3.37.2-2).

我嘗試從原始程式碼建立最新的sqlite3版本,但我找到的最新版本是3.38.5.

https://www.sqlite.org/download.html

#

如何解決?

P粉214089349P粉214089349286 天前567

全部回覆(1)我來回復

  • P粉755863750

    P粉7558637502023-12-13 13:51:24

    我必須安裝libsqlite3-dev

    #https://stackoverflow.com/a/62155296/4684797

    #

    回覆
    0
  • 取消回覆