LoginSignup
0
0

備忘録:Macにhomebrew経由でGROMACSをインストールしたけど動かない

Posted at

MacにGROMACSをインストールするには、homebrewからコマンドひとつでできるらしい。便利。

brew install gromacs
...

gmx --version
zsh: command not found: gmx

動かないのである。

試しにもう一度インストールしてみるとリンクしろと言われる。

brew install gromacs
...
Warning: gromacs 2023.1 is already installed, it's just not linked.
To link this version, run:
  brew link gromacs

その通りにやってみると

brew link gromacs
Linking /usr/local/Cellar/gromacs/2023.1... 
Error: Could not symlink lib/cmake/muparser
/usr/local/lib/cmake is not writable.

/usr/local/lib/cmakeに書き込めないと言われる。
見てみると

ls /usr/local/lib -alh
...  
drwxr-xr-x    3 root  wheel    96B 10 16  2020 cmake

所有者がrootでwriteできないので所有者を変えます。

sudo chown -R ユーザー名:admin /usr/local/lib/cmake 

ls /usr/local/lib -alh
...
drwxr-xr-x    3 ユーザー名   admin    96B 10 16  2020 cmake

もう一度リンク!

brew link gromacs            
Linking /usr/local/Cellar/gromacs/2023.1... 143 symlinks created.

gmx --version
...
GROMACS version:    2023.1-Homebrew
...

動いた!
初歩的な問題だったようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0