Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install diyabcGUI on Mac #148

Open
mccartn opened this issue Mar 7, 2023 · 1 comment
Open

Can't install diyabcGUI on Mac #148

mccartn opened this issue Mar 7, 2023 · 1 comment

Comments

@mccartn
Copy link

mccartn commented Mar 7, 2023

Hi I am trying to install DIYABC-RF package on a Mac M1 running OS Ventura 13.2.1.

In R, I received the following command failure and warning messages:

Downloading GitHub repo diyabc/diyabcGUI@HEAD
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch prod https://github.com/diyabc/DesktopDeployR.git /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//Rtmp3Uanx9/remotes59b57eb642d6/diyabc-diyabcGUI-45092b9/R-pkg/../build/DIYABC-RF_GUI_windows
Error: Failed to install 'diyabcGUI' from GitHub:
Command failed (1)
In addition: Warning message:
In system(full, intern = TRUE, ignore.stderr = quiet) :
running command ''/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch prod https://github.com/diyabc/DesktopDeployR.git /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//Rtmp3Uanx9/remotes59b57eb642d6/diyabc-diyabcGUI-45092b9/R-pkg/../build/DIYABC-RF_GUI_windows' had status 1

@mamccartney
Copy link

When I opened this issue, it appears that I failed to copy in the first error, which is key to the solution. In response to the installation command:

devtools::install_github(

  • "diyabc/diyabcGUI",
    
  • subdir = "R-pkg"
    
  • )

I received the following. The error "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun" was the key.

Downloading GitHub repo diyabc/diyabcGUI@HEAD
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch prod https://github.com/diyabc/DesktopDeployR.git /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//RtmpobBulX/remotes146c52499bad0/diyabc-diyabcGUI-45092b9/R-pkg/../build/DIYABC-RF_GUI_windows
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failed to install 'diyabcGUI' from GitHub:
Command failed (1)
In addition: Warning message:
In system(full, intern = TRUE, ignore.stderr = quiet) :
running command ''/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules --branch prod https://github.com/diyabc/DesktopDeployR.git /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//RtmpobBulX/remotes146c52499bad0/diyabc-diyabcGUI-45092b9/R-pkg/../build/DIYABC-RF_GUI_windows' had status 1

The solution (pointed out to me by Alex Bajcz) is to install the Command Line Tools from Xcode
Open a terminal and run:

xcode-select --install

As detailed in the linked discussion (below) "...This will pop a dialogue box, Select "Install", and it will download and install the Command Line Tools package and fix the problem. (The popped Window may be behind other windows.)"

You don't have to install Xcode, just the Command Line Tools package.
For more details, see: https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a

All the best,

Michael

Michael A McCartney, PhD
Research Associate,
Aquatic Invasive Species
Ecology, Evolution and Genomics
St. Paul MN, USA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants