最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

go - How to resolve 'sqlcli1.h' file not found when using go_ibm_db on macOS? - Stack Overflow

programmeradmin1浏览0评论

I'm trying to use the go_ibm_db Golang driver to connect to an IBM DB2 Warehouse from my macOS machine. However, when I try to build my Go application, I get the following error:

# github/ibmdb/go_ibm_db/api
../api/zapi_unix.go:22:11: fatal error: 'sqlcli1.h' file not found
 #include <sqlcli1.h>
          ^~~~~~~~~~~
1 error generated.

It seems like the driver is expecting the sqlcli1.h header file, but it's missing. I'm on macOS and unsure how to install or point to the necessary DB2 CLI headers/libraries.

Has anyone successfully used this driver on macOS? Any tips on resolving this error would be appreciated.

I'm trying to use the go_ibm_db Golang driver to connect to an IBM DB2 Warehouse from my macOS machine. However, when I try to build my Go application, I get the following error:

# github/ibmdb/go_ibm_db/api
../api/zapi_unix.go:22:11: fatal error: 'sqlcli1.h' file not found
 #include <sqlcli1.h>
          ^~~~~~~~~~~
1 error generated.

It seems like the driver is expecting the sqlcli1.h header file, but it's missing. I'm on macOS and unsure how to install or point to the necessary DB2 CLI headers/libraries.

Has anyone successfully used this driver on macOS? Any tips on resolving this error would be appreciated.

Share Improve this question asked yesterday GiloGilo 7286 silver badges33 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The documentation seems complete , regarding the necessary environment variables to export.

Follow the instructions under "How to Install in Linux/Mac" on this page https://github/ibmdb/go_ibm_db (which details the environment variables you must export that point to clidriver directory).

Ensure that your system meets all the pre-requisuites detailed on that page. The go_ibm_db version should be 0.5.2 or higher because that supports the v12.1 clidriver which is the first version that has native macos arm64 support.

Alternatively you can follow the section 3 "Go_ibm_db installation on MacOS x64 and arm64 Systems" on this page

https://github/ibmdb/go_ibm_db/blob/master/INSTALL.md#insmac

发布评论

评论列表(0)

  1. 暂无评论