我使用Github API来创建一个脚本来传输来自Gitlab的秘密。
在这样做的同时,我一直在尝试设置doing go包来加密秘密。这里是参考https://github.com/GoKillers/libsodium-go的链接
我已经按照页面上提到的步骤操作了。
Pre-setup:
Please install Libsodium here https://download.libsodium.org/doc/installation/index.html
sudo ldconfig
sudo apt-get install pkg-config
Install libsodium-go:
go get -d github.com/GoKillers/libsodium-go
cd $GOPATH/src/github.com/GoKillers/libsodium-go
./build.sh但是对于预设置已经使用了brew install libsodium
当我运行./build.sh时
我得到以下错误
In file included from cryptohash/crypto_hash.go:5:
/usr/local/include/sodium.h:5:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
^~~~~~~~~~~~~~~~~~
1 error generated.不确定如何解决此问题。任何帮助都将不胜感激!
发布于 2021-08-28 15:53:44
也有同样的问题,当我运行brew install libsodium时,显示了一个警告,说明linked已经安装,只是没有链接。要链接,请运行brew link libsodium。如果发现冲突文件,则运行brew link --overwrite libsodium解决了该问题。
https://stackoverflow.com/questions/67261825
复制相似问题