zoukankan      html  css  js  c++  java
  • 无法在Mac Os下通过Gem安装Mysql

    在Mac Os下通过Gem安装Mysql时,老是报错:

    Java代码 复制代码 收藏代码
    1. Building native extensions.  This could take a while...   
    2. ERROR:  Error installing mysql:   
    3.     ERROR: Failed to build gem native extension.   
    4.   
    5.         /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb   
    6. checking for mysql_query() in -lmysqlclient... no   
    7. checking for main() in -lm... yes   
    8. checking for mysql_query() in -lmysqlclient... no   
    9. checking for main() in -lz... yes   
    10. checking for mysql_query() in -lmysqlclient... no   
    11. checking for main() in -lsocket... no   
    12. checking for mysql_query() in -lmysqlclient... no   
    13. checking for main() in -lnsl... no   
    14. checking for mysql_query() in -lmysqlclient... no   
    15. checking for main() in -lmygcc... no   
    16. checking for mysql_query() in -lmysqlclient... no  

     貌似是缺少了某些文件导致的,于是看了看/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb发现extconf.rb好像需要Mysql的PATH,于是执行:

    Java代码 复制代码 收藏代码
    1. export PATH=$PATH:/usr/local/mysql/bin   
    2. sudo gem install mysql -v '2.8.1'  

     

    问题解决:

    Java代码 复制代码 收藏代码
    1. Building native extensions.  This could take a while...   
    2. Successfully installed mysql-2.8.1  
    3. 1 gem installed   
    4. Installing ri documentation for mysql-2.8.1...   
    5. Installing RDoc documentation for mysql-2.8.1...  
  • 相关阅读:
    Xcode-调试断点不能停在代码区终极解决方案
    iOS-修改Status Bar
    iOS-appStore发布流程
    iOS-Debug调试
    iOS-项目搭建
    iOS-UIButton-设置button标题和图片位置
    iOS-布局-Masonry-优先级
    intent 传参数
    五大布局
    execute、executeQuery和executeUpdate之间的区别
  • 原文地址:https://www.cnblogs.com/bjanzhuo/p/3576116.html
Copyright © 2011-2022 走看看