Rails mysql:原因:相对rpath的使用不安全

Rails mysql:原因:相对rpath的使用不安全,mysql,ruby-on-rails,homebrew,mysql2,Mysql,Ruby On Rails,Homebrew,Mysql2,我安装了mysql和rails,升级到了最新的OSX版本,现在我在dev文件夹中运行rails服务器时遇到了这个错误 mt:project1.dev mt$ mysql.server start Starting MySQL SUCCESS! mt:project1.dev mt$ mysql -v Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server ver

我安装了mysql和rails,升级到了最新的OSX版本,现在我在dev文件夹中运行rails服务器时遇到了这个错误

mt:project1.dev mt$ mysql.server start
Starting MySQL
 SUCCESS!
mt:project1.dev mt$ mysql -v
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.26 Homebrew

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Reading history-file /Users/mt/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> Ctrl-C -- exit!
Writing history-file /Users/mt/.mysql_history
Aborted
mt:project1.dev mt$ rails s
/Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2.rb:31:in `require': dlopen(/Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
  Referenced from: /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle
  Reason: unsafe use of relative rpath libmysqlclient.18.dylib in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle with restricted binary - /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle
    from /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.18/lib/mysql2.rb:31:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
    from /Users/mt/Dropbox/01. fm-public/04. Dev/htdocs/project1.dev/config/application.rb:7:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:74:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:74:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'
mt:project1.dev mt$
mt:project1.dev mt$mysql.server start
启动MySQL
成功!
mt:project1.dev mt$mysql-v
欢迎使用MySQL监视器。命令以结束;或\g。
您的MySQL连接id是4
服务器版本:5.6.26自制
版权所有(c)20002015,Oracle和/或其附属公司。版权所有。
Oracle是Oracle公司和/或其子公司的注册商标
附属公司。其他名称可能是其各自的商标
业主。
正在读取历史文件/Users/mt/.mysql\u history
键入“帮助;”或“\h”以获取帮助。键入“\c”以清除当前输入语句。
mysql>Ctrl-C——退出!
正在写入历史文件/Users/mt/.mysql\u history
流产
mt:project1.dev mt$rails
/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2.rb:31:in'require':dlopen(/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle,9):未加载库:libmysqlclient.18.dylib(LoadError)
引用自:/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle
原因:在/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle中不安全地使用相对rpath libmysqlclient.18.dylib和受限二进制文件-/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2/mysql2.bundle
from/Library/Ruby/Gems/2.0.0/Gems/mysql2-0.3.18/lib/mysql2.rb:31:in`'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:76:require中的“块(2级)”中
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in'each'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in'block in require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in'each'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.10.6/lib/bundler.rb:134:in'require'
来自/Users/mt/Dropbox/01。fm public/04。Dev/htdocs/project1.Dev/config/application.rb:7:in`'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.0.1/lib/rails/commands.rb:74:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.0.1/lib/rails/commands.rb:74:in'block in'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.0.1/lib/rails/commands.rb:71:in'tap'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.0.1/lib/rails/commands.rb:71:in`'
从箱子/轨道:4:in“require”
从箱子/轨道:4:in`'
mt:project1.dev mt$
如您所见,mysql正在运行,我安装了最新版本。然而,由于我不是命令行方面的专家,我真的不理解给出的错误消息以及我现在可以做什么

问候,,
Matt

我自己找到了解决方案–禁用SIP为我做到了:可能重复