2013-07-31 44 views
0

我正在嘗試爲我正在構建的網站安裝地理編碼器。我正在使用Geocoder,因爲Google Maps API的查詢限制不足我的需求。我安裝了所有需要的寶石,並安裝了SQLite3。當我實際嘗試安裝geocoder gem(Geocoder :: US)時,運行make文件時出現錯誤。爲什麼我會得到「頭文件丟失」(出錯)?

我收到一個錯誤,我找不出來。它提到錯誤(在標題中),然後討論一個不存在的文件(sqlite3ext.h)。以下是錯誤:

enter image description here

我知道這是模糊的,但我已經工作了10個小時以上努力安裝這一點,並發現了一些幫助在線。任何方向的建議,將不勝感激。

+3

而不是鏈接到圖像,*包括*文本的摘要版本。這有助於我們搜索其他可能的修復方法,並讓搜索引擎更好地爲此頁面編制索引,幫助其他人找到它。 –

回答

4

這是從項目的Readme

To build Geocoder::US, you will need gcc/g++, make, bash or equivalent, the standard *NIX ‘unzip’ utility, and the SQLite 3 executable and development files installed on your system.

看來你缺乏SQLite3的開發頭文件。

這是相關的:

NOTE: If you do not have /usr/include/sqlite3ext.h installed, then your sqlite3 binaries are probably not configured to support dynamic extension loading. If not, you must compile and install SQLite from source, or rebuild your system packages. This is not believed to be a problem on Debian/Ubuntu, but is known to be a problem with Red Hat/CentOS.

此外,他們沒有提到的Windows。您應該:

  1. 問他們是否有人在Windows上使用它,如果有指示。
  2. 尤其在Linux,Debian/Ubuntu上評估一下。
+0

感謝您的迴應,它似乎是更難以在窗口執行,我已經_assured_它會工作。我下載了具有shell.c,sqlite3.c,sqlite3.h,sqlite3.h.ghc,sqlite3ext.h **和sqlite3ext.h.ghc的sqlite-amalgamation文件夾。你有任何想法如何將這些文件放在正確的目錄中嗎?在此先感謝 – MingMan

+0

記錄我正在使用Windows Server 2012(一個Windows 8格式) – MingMan

+0

找到解決方案:您需要更改Windows的構建代碼。該說明僅適用於Linux。 – MingMan

0

-fPiC不是你的問題。如日誌所述,編譯後的代碼已經獨立於位置。問題是,sqllite3ext.h不在編譯器包含路徑中。

+0

改變了這一點,感謝您的意見,標題絕對是誤導性的 – MingMan

相關問題