-
Notifications
You must be signed in to change notification settings - Fork 1
How to install Readline
Miguel Guardia edited this page Apr 5, 2024
·
1 revision
- Install homebrew by copying this command on a terminal and follow the steps.
rm -rf $HOME/.brew && git clone --depth=1 https://github.com/Homebrew/brew $HOME/.brew && echo 'export PATH=$HOME/.brew/bin:$PATH' >> $HOME/.zshrc && source $HOME/.zshrc && brew update
- Install readline and follow the steps.
brew install readline
- Make sure you have the correct lines uncommented on the minishell Makefile:
# MAC 42
CPPFLAGS = -I$(HOME)/.brew/opt/readline/include
LDFLAGS = -L$(HOME)/.brew/opt/readline/lib
# PERSONAL MAC
# CPPFLAGS = -I/usr/local/Cellar/readline/8.2.10/include
# LDFLAGS = -L/usr/local/Cellar/readline/8.2.10/lib
- Install homebrew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install readline and follow the steps.
brew install readline
- Make sure you have the correct lines uncommented on the minishell Makefile:
# MAC 42
# CPPFLAGS = -I$(HOME)/.brew/opt/readline/include
# LDFLAGS = -L$(HOME)/.brew/opt/readline/lib
# PERSONAL MAC
CPPFLAGS = -I/usr/local/Cellar/readline/8.2.10/include
LDFLAGS = -L/usr/local/Cellar/readline/8.2.10/lib
This is working for me, make sure the path exits on your computer and your readline version is 8.2.10.
- Install readline and follow the steps.
sudo apt-get install libreadline-dev
- Compile only with -lreadline (already include, just comment CPPFLAGS and LDLFLAGS).