asdfでRをインストールをしたときのハマりどころ
asdfでRをインストールしたとき、ライブラリ関連でハマったのでメモ 環境 Hostマシン: M1 Macbook Air OS: macOS Monterey(12.5) asdf v0.10.2 インストール手順 asdf plugin-add R https://github.com/asdf-community/asdf-r.git asdf r install latest 以下、自分がハマったところの対応方法 liblzma library and headers are required xzのインストールと関連ファイルのリンクを設定 brew install xz set -x LDFLAGS "-L/opt/homebrew/opt/xz/lib" $LDFLAGS set -x CPPFLAGS "-I/opt/homebrew/opt/xz/include" $CPPFLAGS fatal error: 'pcre2.h' file not found pcre2のインストールと関連ファイルへのリンクを設定 brew install perc2xz set -x LDFLAGS "-L/opt/homebrew/opt/pcre2/lib" $LDFLAGS set -x CPPFLAGS "-I/opt/homebrew/opt/pcre2/include" $CPPFLAGS fatal error: 'jpeglib.h' file not found jpegのインストールと関連ファイルへのリンクを設定 brew install perc2xz set -x LDFLAGS "-L/opt/homebrew/opt/jpeg/lib" $LDFLAGS set -x CPPFLAGS "-I/opt/homebrew/opt/jpeg/include" $CPPFLAGS 参考 [Python3 / pandas] pandasをアップデートしたら、lzmaなるmoduleがimportできないというメッセージが出た - Qiita ここを参考に、環境変数を設定した