# __ .______ __ __ .______ .___________. ______ ______ .___ ___. # | | | _ \ | | | | | _ \ | | / | / __ \ | \/ | # | | | |_) | | |__| | | |_) | `---| |----` | ,----'| | | | | \ / | # | | | ___/ | __ | | ___/ | | | | | | | | | |\/| | # | | | | | | | | | | | | __ | `----.| `--' | | | | | # |__| | _| |__| |__| | _| |__| (__) \______| \______/ |__| |__| # ""$o o$"" ""$o o$" o "$""""o "o $" o""" $" "$o "$o" $o " $ o$" "$o $$$o$$$$o$$$$ $" "oooo o "" ""$$$$$$$$""o"" oo oooo" "$$$$$$oo"oo$$$o" o$$$$oo" o$$$o "o$$$$$$$ "$ $$$$$$$$$oo o$$$$$$$$$o"$" $ $$$ $$$$$$ o$$$$$$ "$$o"o $ $$$$o $$$$$$ $$$$$$$ $$$$o"o $ $$$$$ $$$$$" "$$$$$ $$$$$$ $ $o""""" """" """ """"""$" $ o$$$$$"""$$$$$"$$$$$""$$$$$ooo"o $ o"$o $$$$$$$$oo$$$$$$$$o $$"" $ oo$ "$$$$$$$$$$$$$$$$$$$$" o" o $oo o$$$"$ $$o"o $$$$$$$"" "$$$$$$$ o$$ $$$$o IPHPT BUG o$$$$" $ $$$$ o "$$$$$oo o$$$$$$ "o$$$$ $ $$$$$ o$$"" $ $$$$$o" "$$$$$$$$$$$$$ o o$$$$$o$ "" $$ $$" $ $$$" o"o$$$$$$$$$$$$ " "$$$ $ $$o o$$ "o $$ " $$$$$$$$$$$"o "$$ $ $$$ $$$ oo$ $ o""$$""$$$o " $"o$o $$$o o$$$$ o$$$"o"$oo$$$$o" o $o $$$$$oo$ $$$$o $$$$ $$$$ $$$$" $ $$$$$"" $$ o$$$ """$$$$"o" "$$$o "$$$o $$$" o """ $ $$$oo $$$$o" $$ o$$$"o" """"$ o$$$ o$" $$$ $ "$"" o$"o"$$o$$$$ "$$"o" o$$ "$oo $ " $$o $ "oo$"o$$$"o$o"$$$$o" o" $$$ ""$o $$ $$$o "o$$o$"$$"$$o$$o$$"$$o" $$$ ""o $$$ ""$$$ $$$$$$ $$$$ $" $$$$ $$ $$$$ $$$$"$$$o$ $"" $$$ $$$$ "$$$ """ $$$$ $$"" "$$ oo$" $ooo $ "$$ Qconf本地环境问题   -  叶落山城秋

Qconf本地环境问题

dyld: Library not loaded: libqconf.dylib
  Referenced from: /Users/zhu/work/go/xxx(项目)/bin/ ./(go项目执行文件)
  Reason: image not found

问题:

  • 本地go的项目启动时候报错
  • 因为项目里用了 Qconf 组件,本地没有安装

环境:

  • 代码是Golang
  • 依赖Qconf
  • 电脑是 macos

解决方式:

git clone https://github.com/Qihoo360/QConf.git

cd QConf && mkdir build && cd build && cmake .. 这里 cmake ..

cmake命令没有 自行安装一下

第一次可能会报错,直接无视,再 cmake .. 一遍就可以了。

我仔细观察了下,我的 cmake失败了,里面有个warnings

MACOSX_RPATH is not specified for the following targets

解决方案是

克隆下来的代码里有个 CMakeLists.txt 文件,打开,在 里面加上一行 set(CMAKE_MACOSX_RPATH 1)

然后重新执行 cmake 结束看到下面

Configuring done
-- Generating done
-- Build files have been written to:

退回到克隆的Qconf下 执行

make

sudo make install

参考:

如何在 OSX 上运行 QConf

CMake warnings under OS X: MACOSX_RPATH is not specified for the following targets

QConf 简易部署和使用


欢迎转载,但请附上原文地址哦,尊重原创,谢谢大家 本文地址: https://www.iphpt.com/detail/140/
本站(PHP --> Golang)已重构,代码开源

当你能力不能满足你的野心的时候,你就该沉下心来学习