0

Issue description:

I'm trying to install 'ggplot2' package on my R studio I'm installing on MacOs Mojave 10.14.1. Each time I'm trying to installing using either

  • install.packages("ggplot2", dependencies = T)

  • R Studio -> tools -> install packages... and type down 'ggplot2'

I have the following error appear:

sh: line 1:  1549 Abort trap: 6      /Applications/Xcode.app/Contents/Developer
error: unable to find utility "package_name", not a developer tool or in PATH

My approach to solve the issue:

  • I made sure that Xcode installed and updated
  • in R Studio, I made sure that I'm able to download contents without using secure HTTPS method tools -> global options -> packages -> unchecked 'Use secure download method for HTTP '

none of above approaches worked for me.

How can I overcome this issue ?!

Hanson
  • 1
  • 1
  • 3

1 Answers1

0

I come across the solution in Stackoverflow provided by Ivan Mir, basically you need do the following:

Check out xcode-select --print-path in your Terminal.

If it's /Applications/Xcode.app/Contents/Developer then run

sudo xcode-select --switch /Library/Developer/CommandLineTools to set xcode-select to non-Xcode Command Line Tools.

In case you don't have /Library/Developer/CommandLineTools directory, you can get them here for your current Xcode version.

ebeneditos
  • 2,542
  • 1
  • 15
  • 35
Hanson
  • 1
  • 1
  • 3