[R-SIG-Mac] In install.packages(), C compiler cannot create executables

Balamuta, James Joseph b@|@mut2 @end|ng |rom ||||no|@@edu
Mon Jul 29 00:34:12 CEST 2019


Greetings and Salutations Naresh Gurbuxani,

Don't use homebrew to install R. If you must use homebrew, install R via the brew cask project to obtain the CRAN binary vs. the homebrew compiled variant.

Sincerely,

JJB

On 7/28/19, 5:28 PM, "R-SIG-Mac on behalf of Naresh Gurbuxani" <r-sig-mac-bounces using r-project.org on behalf of naresh_gurbuxani using hotmail.com> wrote:

    Hello,
    
    On my Mac, everything is installed using brew.  I am not able to install some R packages which look for C compiler.  Below is an example session on the terminal.  
    
    I will be thankful for any suggestions.  If this question does not belong to this group, can you suggest where to look?
    
    Naresh
    
    > install.packages('stringi', repos='https://cran.r-project.org')
    Installing package into ‘/usr/local/lib/R/3.6/site-library’
    (as ‘lib’ is unspecified)
    trying URL 'https://cran.r-project.org/src/contrib/stringi_1.4.3.tar.gz'
    Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
    ==================================================
    downloaded 7.0 MB
    
    * installing *source* package ‘stringi’ ...
    ** package ‘stringi’ successfully unpacked and MD5 sums checked
    ** using staged installation
    checking for R_HOME... /usr/local/Cellar/r/3.6.1/lib/R
    checking for R... /usr/local/Cellar/r/3.6.1/lib/R/bin/R
    checking for endianness... little
    checking for R >= 3.1.0 for C++11 use... yes
    checking for R < 3.4.0 for CXX1X flag use... no
    checking for cat... /bin/cat
    checking for local ICUDT_DIR... icu61/data
    checking for gcc... /usr/local/opt/llvm/bin/clang -fopenmp
    checking whether the C compiler works... no
    configure: error: in `/private/var/folders/nv/778l86d50jx2_wlzdw6m16l40000gn/T/Rtmp3KDSQ5/R.INSTALL87262e900de6/stringi':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    ERROR: configuration failed for package ‘stringi’
    * removing ‘/usr/local/lib/R/3.6/site-library/stringi’
    
    The downloaded source packages are in
    	‘/private/var/folders/nv/778l86d50jx2_wlzdw6m16l40000gn/T/Rtmp3hnR8I/downloaded_packages’
    Warning message:
    In install.packages("stringi", repos = "https://cran.r-project.org") :
      installation of package ‘stringi’ had non-zero exit status
    > R.Version()
    $platform
    [1] "x86_64-apple-darwin17.7.0"
    
    $arch
    [1] "x86_64"
    
    $os
    [1] "darwin17.7.0"
    
    $system
    [1] "x86_64, darwin17.7.0"
    
    $status
    [1] ""
    
    $major
    [1] "3"
    
    $minor
    [1] "6.1"
    
    $year
    [1] "2019"
    
    $month
    [1] "07"
    
    $day
    [1] "05"
    
    $`svn rev`
    [1] "76782"
    
    $language
    [1] "R"
    
    $version.string
    [1] "R version 3.6.1 (2019-07-05)"
    
    $nickname
    [1] "Action of the Toes"
    
    > capabilities()
           jpeg         png        tiff       tcltk         X11        aqua 
           TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
       http/ftp     sockets      libxml        fifo      cledit       iconv 
           TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
            NLS     profmem       cairo         ICU long.double     libcurl 
           TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
    > system('gcc --version')
    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 10.0.0 (clang-1000.10.44.4)
    Target: x86_64-apple-darwin17.7.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    > system('which gcc')
    /usr/bin/gcc
    > system('brew doctor')
    Your system is ready to brew.
    > 
    
    
    
    _______________________________________________
    R-SIG-Mac mailing list
    R-SIG-Mac using r-project.org
    https://stat.ethz.ch/mailman/listinfo/r-sig-mac
    



More information about the R-SIG-Mac mailing list