1.准备环境 安装pkg-config,librdkafka,openssl brew install pkg-config brew install librdkafka brew install openssl 2.golang中配置运行环境 PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@1.1/lib/pkgconfig -tags dynamic 3.debug运行