我想安裝此寶石,summarize,通過運行:無法安裝總結創業板OSX,失蹤glib.h
gem install summarise
我得到的錯誤:
ERROR: Failed to build gem native extension.
...
In file included from article.c:25:
./libots.h:24:10: fatal error: 'glib.h' file not found
但當我嘗試運行:
brew install glib
我得到:
glib-2.38.2 already installed
接下來要做什麼的任何想法?
編輯: 我已經嘗試過,因爲:
export CPPFLAGS=-I/usr/local/Cellar/glib/2.38.2/include/glib-2.0/
export LDFLAGS=-L/usr/local/Cellar/glib/2.38.2/lib/
export PKG_CONFIG_PATH=/usr/local/Cellar/glib/2.38.2/lib/pkgconfig/
...這似乎已經讓我移動到一個新的錯誤:
compiling article.c
article.c:107:37: warning: passing 'const unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
if ((aWord == NULL) || (0==strlen(aWord)) ||(NULL==aLine)) return;
^~~~~
/usr/include/string.h:82:28: note: passing argument to parameter here
size_t strlen(const char *);
^
article.c:109:68: warning: passing 'const unsigned char *' to parameter of type 'const gchar *' (aka 'const char *') converts between pointers to integer types with different sign [-Wpointer-sign]
aLine->words = g_list_append (aLine->words, (gpointer) g_strdup (aWord));
^~~~~
/usr/local/Cellar/glib/2.38.2/include/glib-2.0/glib/gstrfuncs.h:216:52: note: passing argument to parameter 'str' here
gchar* g_strdup (const char *str) G_GNUC_MALLOC;
.. 。
dictionary.c:28:10: fatal error: 'libxml/xmlmemory.h' file not found
#include <libxml/xmlmemory.h>
這就是我最終使用的。從我可以告訴它做很多相同的工作。乾杯。 –