在Windows上安装gokogiri时找不到libxml2错误

编程入门 行业动态 更新时间:2024-10-24 07:26:46
本文介绍了在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/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错误

    本文发布于:2023-10-13 09:51:28,感谢您对本站的认可!
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:找不到   错误   Windows   gokogiri

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!