一般的我们mac行安装mysql的数据库的时候出现的问题,在vapor上进行使用的时候;
拉取编译的时候,显示如下错误:
![](https://img.haomeiwen.com/i1205674/47249c88e6663e4a.png)
显示的问题是: 我们没有找到对应的mysql.h的文件,应该是没有对应的链接在上面,我们可以通过软连接的方式进行实现;
when I meet this problem ,
not found this header ,so I link the mysql.h to that ;
so just like this ;
ln -s /usr/local/mysql/include /usr/local/include/mysql
ln -s source target
不多还是出现了下面的问题:
![](https://img.haomeiwen.com/i1205674/45ed1fb0a1fba623.png)
![](https://img.haomeiwen.com/i1205674/33347920d9990d90.png)
![](https://img.haomeiwen.com/i1205674/fdc4472a087589f8.png)
![](https://img.haomeiwen.com/i1205674/8a497d8101290068.png)
也就是我们在使用dmg后缀进行安装的时候,就会出现没有支持的x86_64的库;
所以,我们安装的mysql系统应该支持x86_64的架构;
ps:解决上面的问题,就是下载对应支持mysql的版本,我们可以通过源代码安装,同时也是可以通过brew的方式进行安装;
brew install mysql (安装)
brew link mysql (链接mysql)
问题链接
https://github.com/vapor/vapor/issues/499
https://github.com/vapor/mysql-provider/issues/16#issuecomment-255058106
网友评论