dongluan6784 2019-06-24 00:43
浏览 496
已采纳

用neo4j go驱动程序编译neo4j代码的问题

I am trying to run the sample code available at (https://neo4j.com/developer/go/) using golang neo4j driver but running into compiling issues.

I have build the seabolt 1.7.4 from source. Have the following variables in place PKG_CONFIG_PATH pointing to seabolt-1.7.4/build/dist/share/pkgconfig OPENSSL_ROOT_DIR=/usr/local/opt/openssl DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/seabolt-1.7.4/build/dist/lib

When I try to build my code with command env GOOS=linux go build -ldflags="-s -w" --tags seabolt_static -o bin/user users/user.go

I get the following error

github.com/neo4j-drivers/gobolt ../pkg/mod/github.com/neo4j-drivers/gobolt@v1.7.4/connector_worker.go:30:14: undefined: Config ../pkg/mod/github.com/neo4j-drivers/gobolt@v1.7.4/connector_worker.go:31:15: undefined: seaboltConnector

Can anyone point me in right direction.

  • 写回答

1条回答 默认 最新

  • dougu4704 2019-09-11 09:28
    关注

    This has been the source of a big issue for me too, but I eventually sorted it out.

    The issue is that the lib you download from their repo is most likely linked to a version of openssl you don't have installed. So you likely need to either compile it yourself so it's relevant to your current OS and architecture, or you need to manually edit the path of the dynamically linked libraries so that it's correct, with nm for example if you're on macOS.

    Simply put, you need to make libseabolt available on your working environment first.

    It's safe to assume it's a pain in the ass for deploying stuff properly, I had to do hacks here and there to be able to deploy stuff with docker consistently using this driver.

    Good luck :)

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

报告相同问题?

悬赏问题

  • ¥30 Matlab打开默认名称带有/的光谱数据
  • ¥50 easyExcel模板 动态单元格合并列
  • ¥15 res.rows如何取值使用
  • ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
  • ¥15 CSP算法实现EEG特征提取,哪一步错了?
  • ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
  • ¥15 vue3前端取消收藏的不会引用collectId
  • ¥15 delphi7 HMAC_SHA256方式加密
  • ¥15 关于#qt#的问题:我想实现qcustomplot完成坐标轴
  • ¥15 下列c语言代码为何输出了多余的空格