Man*_*ich 16 ruby gem libxml2 nokogiri
我试图安装Nokogiri但我总是得到一个编译错误:
checking for libxml/parser.h... *** extconf.rb failed ***
Run Code Online (Sandbox Code Playgroud)
但是,我已经安装了它和所有其他依赖项.
我尝试给安装程序提示如下:
%> gem install nokogiri -- --with-xml2-lib=/usr/lib/ --with-xml2-include=/usr/include/libxml2/
...
checking for libxml/parser.h... *** extconf.rb failed ***
...
Run Code Online (Sandbox Code Playgroud)
但它仍然没有安装:
%> find /usr/include/ -name "parser.h"
/usr/include/libxml2/libxml/parser.h
...
Run Code Online (Sandbox Code Playgroud)
我在Ubuntu 11.10上.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
产量:
" dpkg-query -l | grep xml"和" dpkg-query -l | grep xslt"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
失败似乎是海湾合作委员会的一方:
%> cat hello.c
#include <stdio.h>
main()
{
printf("Hello World \n");
}
%> gcc hello.c
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'
collect2: ld gab 1 als Ende-Status zurück
Run Code Online (Sandbox Code Playgroud)
ear*_*ils 21
这会奏效.
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9092 次 |
| 最近记录: |