Download here: http://gg.gg/xeq58
久しぶりにRailsの勉強をしようと思い、rails newで最新版のRailsアプリケーションを作成しようとしたところ、「mysql2のv0.5.2がインストールされていない」旨のエラーがでましたのでこれを解消しようとしました。
*Ld Library Not Found For Lssl Mac Mysql Download
*Ld Library Not Found For Lssl
*Ld Library Not Found For Lssl Mac Mysql Tutorial
*Ld Library Not Found For Lssl Mac Mysql Database
The stack trace line saying `ld: library not found for -lssl` will give you the hint about what information is missing (ssl lib not found). 教程需要安装mysqlclient,我执行 pip3 install mysqlclient会有许多报错,如下: ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command ’gcc’ failed with exit status 1 但是我执行pip3 install mysql-client就能安装成功: Collecting mysql-client. Manual setup on Mac OS X (10.13 - 11.0). Ld: library not found for -lssl. Devel openssl-devel ImageMagick ImageMagick-devel mysql-devel postgresql-devel.*追記(2020.3.2)
bundle installでmysql2インストールが失敗したので、こちらの記事を参考にして解決しました!
RailsにMySQLを導入したらかなりハマった件について - 大学生Webエンジニアの記録 -
【Rails】MySQL2がbundle installできない時の対応方法 - Qiita -
ターミナルからgem install mysql2 -v 0.5.2を実行したところ、以下のようなエラーが出ました
エラーを見ていくと
とのこと。
sslのライブラリが見つからないということなので、色々と調べて以下を試してみました。1. opensslのインストール(アップグレード)
自分のPCにはすでにopensslがbrew経由でインストールされているので、opensslが最新かどうかbrew outdatedコマンドをターミナルで確認します。するとopenssl (1.0.2o_1) < 1.0.2qと表示されたので、brew upgrade opensslコマンドで(一応)アップグレードしました。*補足
自分の場合、mysqlのバージョンも古かったせいか、opensslのアップデートに合わせてmysqlも一緒にアップグレードされました。。。2. XCode select toolsのインストール(アップグレード)
githubで公開されているmysql2のREADMEを確認すると、xcode-select --installコマンドをターミナルで実行して、XCode select toolsをインストールする必要があると記載がありました。自分のPCにはすでにXCode select toolsがインストールされていましたが、バージョンが古い可能性があったので、再度コマンドを実行して最新版にアップグレードしました。Ld Library Not Found For Lssl Mac Mysql Download3. オプションを指定して、mysql2をインストール(解決策)
再度gem install mysql2 -v 0.5.2を実行しましたが解消されなかったため、調べ直したところオプションコマンドを追加することで解消するとのこと。(GitHubGistサイト参照)
コマンドを入力して再度実行してみると・・・
成 功 し ま し た !
念の為、gem listコマンドでインストールされたか確認してみると
v0.5.2がインストールされていることが確認できます。
しばらくRailsをいじっていなかったので、コマンドがわからず四苦八苦しましたが、なんとか解決できてよかったです。。。 Free download microsoft office for mac os catalina.
Install mysql2 on MacOS Mojave - GitHubGist -
brianmario/mysql2 - GitHub -
Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64. Posted by: Timothy Cerka
Date: January 03, 2020 07:53PM
Thanks Luis for the reply.
I had the library path in the project but not explicitly the lib. I explicitly added the library to the project and now we are much closer. The only problem is, now that the lib has been added, the linker can’t find it. Here is the output from the console:
18:29:21 **** Incremental Build of configuration Debug for project SQL_Test_1 ****
make all
Building target: SQL_Test_1
Invoking: MacOS X C++ Linker
g++ -L/repository_source_code/mysql/connector/mysql-connector-cpp-8.0.18/mysql-connector-cpp-8.0.18 -o ’SQL_Test_1’ ./main.o -l/repository_source_code/mysql/connector/mysql-connector-cpp-8.0.18/mysql-connector-cpp-8.0.18/libmysqlcppconn8-static.a
ld: library not found for -l/repository_source_code/mysql/connector/mysql-connector-cpp-8.0.18/mysql-connector-cpp-8.0.18/libmysqlcppconn8-static.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [SQL_Test_1] Error 1
18:29:21 Build Finished (took 62ms)
Thanks for the help.
Tim
With Thanks
Tim Cerka
Mac Mini 2.5 GHz Intel Core i5
macOS Sierra v10.12.6
Eclipse IDE for C/C++ Developers
Version: Mars.1 Release (4.5.1)
Options:Reply•Quote
ViewsPostedLd Library Not Found For LsslI need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Ld Library Not Found For Lssl Mac Mysql TutorialRe: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.Re: I need help with a build of mysql connector 8 test code which fails with symbols not found for architecture x86-64.
Ld Library Not Found For Lssl Mac Mysql DatabaseSorry, you can’t reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.
Download here: http://gg.gg/xeq58

https://diarynote.indered.space

コメント

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索