error libxml2 not found on installing gokogiri on windows

折月煮酒 提交于 2019-12-31 05:46:26

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/30960805/error-libxml2-not-found-on-installing-gokogiri-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!