Skip to content

update.packages() cannot install from source

4 messages · Spencer Graves, Balamuta, James Joseph, Dr Eberhard W Lisse

#
Hello, All:


 ????? "update.packages()" fails for me on packages DescTools, digest, 
jpeg, mgcv, openxlsx, rlang, and spam.? It first says:


 ? There are binary versions available but the
 ? source versions are later:
 ?????????? binary? source needs_compilation
DescTools 0.99.29 0.99.30????????????? TRUE
digest???? 0.6.21? 0.6.22????????????? TRUE
jpeg??????? 0.1-8 0.1-8.1????????????? TRUE
mgcv?????? 1.8-29? 1.8-30????????????? TRUE
openxlsx? 4.1.0.1?? 4.1.2????????????? TRUE
rlang?????? 0.4.0?? 0.4.1????????????? TRUE
spam??????? 2.3-0 2.3-0.2????????????? TRUE


 ????? It then asks, "Do you want to install from sources the packages 
which need compilation? (Yes/no/cancel)".? I reply "y" or "Yes".? For 
each package, it says it was

... successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path 
(/Library/Developer/CommandLineTools), missing xcrun at: 
/Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ?DescTools?
* removing 
?/Library/Frameworks/R.framework/Versions/3.6/Resources/library/DescTools?
* restoring previous 
?/Library/Frameworks/R.framework/Versions/3.6/Resources/library/DescTools?


 ????? A web search for "xcrun: error: invalid active developer path" 
identified a couple of discussions on StackExchange that say that I need 
to have Xcode installed correctly.? I think I have everything up to 
date:? macOS 10.15.1 Catalina with Xcode downloaded and installed via 
the App store.? RStudio 1.2.5001 with:


sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.1

Matrix products: default
BLAS: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats???? graphics? grDevices utils???? datasets
[6] methods?? base

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1


"https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a" 
recommends, "xcode-select --install", which to me seems like it should 
be equivalent to the install I just did via the App Store. This 
StackExchange discussion also said, "If the above alone doesn't do it, 
then also run:? xcode-select --reset".? However, before I do that, I 
thought I'd ask here if anyone else is having a problem like this.? And 
if yes, and if they've fixed it, what did they do to fix it?


 ????? Thanks,
 ????? Spencer Graves
#
Greetings and Salutations,

Note that Xcode Command Line Tools is not the same as Xcode IDE. In fact, only Xcode CLI Tools are required, which are light-weight compared to the IDE.

Regarding your error, this is symptomatic of an Xcode update tied to an OS point-release. Note in the session information 10.15.1 (the .1 being the bump)

    R version 3.6.1 (2019-07-05)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS Catalina 10.15.1

Both of the commands highlighted are accurate. Though, the order should be changed to:

sudo xcode-select --reset
sudo xcode-select --install

The reset changes back to using the default command line tools path. This was needed for Mojave.

Sincerely,

JJB

?On 10/29/19, 4:01 PM, "R-SIG-Mac on behalf of Spencer Graves" <r-sig-mac-bounces at r-project.org on behalf of spencer.graves at prodsyse.com> wrote:

    Hello, All:
    
    
           "update.packages()" fails for me on packages DescTools, digest, 
    jpeg, mgcv, openxlsx, rlang, and spam.  It first says:
    
    
       There are binary versions available but the
       source versions are later:
                binary  source needs_compilation
    DescTools 0.99.29 0.99.30              TRUE
    digest     0.6.21  0.6.22              TRUE
    jpeg        0.1-8 0.1-8.1              TRUE
    mgcv       1.8-29  1.8-30              TRUE
    openxlsx  4.1.0.1   4.1.2              TRUE
    rlang       0.4.0   0.4.1              TRUE
    spam        2.3-0 2.3-0.2              TRUE
    
    
           It then asks, "Do you want to install from sources the packages 
    which need compilation? (Yes/no/cancel)".  I reply "y" or "Yes".  For 
    each package, it says it was
    
    ... successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    xcrun: error: invalid active developer path 
    (/Library/Developer/CommandLineTools), missing xcrun at: 
    /Library/Developer/CommandLineTools/usr/bin/xcrun
    ERROR: compilation failed for package ?DescTools?
    * removing 
    ?/Library/Frameworks/R.framework/Versions/3.6/Resources/library/DescTools?
    * restoring previous 
    ?/Library/Frameworks/R.framework/Versions/3.6/Resources/library/DescTools?
    
    
           A web search for "xcrun: error: invalid active developer path" 
    identified a couple of discussions on StackExchange that say that I need 
    to have Xcode installed correctly.  I think I have everything up to 
    date:  macOS 10.15.1 Catalina with Xcode downloaded and installed via 
    the App store.  RStudio 1.2.5001 with:
    
    
    sessionInfo()
    R version 3.6.1 (2019-07-05)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS Catalina 10.15.1
    
    Matrix products: default
    BLAS: 
    /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: 
    /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
    
    locale:
    [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets
    [6] methods   base
    
    loaded via a namespace (and not attached):
    [1] compiler_3.6.1 tools_3.6.1
    
    
    "https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a" 
    recommends, "xcode-select --install", which to me seems like it should 
    be equivalent to the install I just did via the App Store. This 
    StackExchange discussion also said, "If the above alone doesn't do it, 
    then also run:  xcode-select --reset".  However, before I do that, I 
    thought I'd ask here if anyone else is having a problem like this.  And 
    if yes, and if they've fixed it, what did they do to fix it?
    
    
           Thanks,
           Spencer Graves
    
    _______________________________________________
    R-SIG-Mac mailing list
    R-SIG-Mac at r-project.org
    https://stat.ethz.ch/mailman/listinfo/r-sig-mac
#
The

xcode-select ?install

is required after upgrading to Catalina.

I have several machines so I usually only need to figure out once what Apple has done this time :-)-O.

Once I know that, the other machines usually go without a hitch. And after a while one settles in and doesn?t even notice Apple being Nanny any longer. But I still write it into my handbook so next version I can remember :-)-O

I usually do homebrew first and when that works the other stuff usually compiles as well.

Or you can run

	make

if that works, xcode-cli is installed properly.


el

?
Sent from Dr Lisse?s iPhone Xs
On 29 Oct 2019, 23:13 +0200, Balamuta, James Joseph <balamut2 at illinois.edu>, wrote:

  
  
#
????? Thanks to James Joseph Balamuta and Eberhard W. Lisse.? I 
followed the 2-step procedure outlined by Balamuta, and it fixed the 
problem for all but the jpeg package.? I will write the maintainer of 
that package.? (The one-step would probably have worked, but I didn't 
try it.)


 ????? Thanks again,
 ????? Spencer Graves
On 2019-10-29 16:12, Balamuta, James Joseph wrote: