# On macOS Mojave, rbenv install 2.6.1 hangs at "use realline from homebrew"
First install readline from homebrew
```bash
brew install readline
brew link --force readline
```
This fixed it for me:
```bash
RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" rbenv install 2.6.1
```
**OR**
Identify location readline and run command export env `LDFLAGS` like this example
example on my macbook:
```bash
export LDFLAGS="-L/Users/tamnguyen/.rbenv/versions/2.6.1/lib -L/usr/local/lib -L/usr/local/Cellar/readline/8.0.0/lib"
```
-----------
Enjoy :D