2013-07-31 59 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

相关问题