Installing gmp failed: Header file gmp.h not found

I have problems installing the gmp package:

configure: error: Header file gmp.h not found; maybe use --with-gmp-include=INCLUDE_PATH
ERROR: configuration failed for package ‘gmp’

But I have gmp installed because after trying to install it with Homebrew (brew install gmp) I got the warning message:

Warning: gmp 6.2.1_1 is already installed and up-to-date.

Searching with macOS Finder I found the location of gmp.h:

I tried:

install.packages("gmp", type="source", configure.args = "--with-gmp-include=/usr/local/Cellar/gmp/6.2.1_1/include/")

but without avail.

What is wrong here? Help is very appreciated.

macOS Monterey 12.3, Intel.
R version 4.1.3 (2022-03-10). Platform: x86_64-apple-darwin17.0 (64-bit).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.