在Windows上安装gokogiri时找不到libxml2错误 [英] error libxml2 not found on installing gokogiri on windows

查看:276
本文介绍了在Windows上安装gokogiri时找不到libxml2错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows 8机器上安装,解压缩/解压并添加 bin 文件夹转换为路径环境变量

  • 下载 libxml2 -2.9.2-win32-x86.7z from here ,解压。创建新的环境变量 PKG_CONFIG_PATH ,并将libxml的 \lib\pkgconfig 文件夹位置添加到env变量中。


  • 此处


    现在错误信息如下。接下来我应该做什么?如何正确地让 gcc 知道我的libxml2文件的位置?
    $ b

    解决方案



    选项1:删除libxml并将其重新安装到不含空格的路径中(不包括程序文件)

    选项2(可能不适用于gcc)在环境变量中指向libxml(包括您的路径)在libxml的名称路径中使用引号


    I'm trying to install gokogiri on Windows 8 machine following instructions in their github page :

    To install:

    • sudo apt-get install libxml2-dev
    • go get github.com/moovweb/gokogiri

    skipping the first command (as it isn't available on Windows), I get the following error :

    What is the error complaining about? Should I install libxml-2.0 manually before retrying the "go get" command?

    UPDATE :

    The following are the steps I've done, each step based on error message I get from retrying the go get command after completing the previous step :

    • Download pkg-config_0.26-1_win32.zip from here, unzip/extract, and add the bin folder to path environment variable

    • Donwload libxml2-2.9.2-win32-x86.7z from here, unzip. Create new environment variable PKG_CONFIG_PATH, and add libxml's \lib\pkgconfig folder location to the env variable.

    • Donwload and install tdm64-gcc from here

    Now the error message is as follow. What should I do next? How to properly make gcc aware of the location of my libxml2 files?

    解决方案

    you have a space in your path to libxml.

    option 1: remove libxml and reinstall it at a path without spaces (not program files)

    option 2 (might not work for gcc) in the enviroment variable points to libxml (including your path) use quotes around the name path to libxml

    这篇关于在Windows上安装gokogiri时找不到libxml2错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆