duan1226 2017-09-20 16:46 采纳率: 100%
浏览 240
已采纳

找不到-ltensorflow

I'm trying to make work TF on Mac OS X. I ran the tutorial how to install it. All went well, the tensorflow library is install in my GOPATH but I keep getting this error.

/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: library not found for -ltensorflow
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I understand it is something about C compiler cannot found ltensorflow library. TF runs all good with Python2.7 though.

Any ideas how to fix it, please?

EDIT:

Air-MacBook-Air-Fonzik:GoTensor air$ echo $DYLD_LIBRARY_PATH 
/Users/air/PycharmProjects/GoTensor/
Air-MacBook-Air-Fonzik:GoTensor air$ echo $LIBRARY_PATH 
/Users/air/PycharmProjects/GoTensor/
Air-MacBook-Air-Fonzik:GoTensor air$ echo $GOPATH
/Users/air/PycharmProjects/GoTensor/

this is the output of my paths now, still does not work. The folder GoTensor contains the pkg and src of tensorflow go package. Is this setup correct?

  • 写回答

1条回答 默认 最新

  • dprnr5559 2017-09-20 21:59
    关注

    $DYLD_LIBRARY_PATH and $LIBRARY_PATH need to include the directory in which the C library (libtensorflow.so) is installed, not the Go libraries.

    I suspect this is not the case for you (ls ${DYLD_LIBRARY_PATH}/libtensorflow.so). (See Step 2 and 3 in https://www.tensorflow.org/install/install_go).

    To avoid needing the environment variables, you could also ensure that libtensorflow.so is in /usr/local/lib and then run ldconfig once after extracting it.

    Hope that helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记