Skip to content

Serious problem with R on macOS

25 messages · Calboli Federico (LUKE), Uwe Ligges, Kevin E. Thorpe +8 more

#
Uwe Ligges (from CRAN sys admin) recommended that I post this to the list.

Thank you.



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: DePaolis, Fernando <fdepaolis at middlebury.edu>
Date: Monday, June 5, 2023 at 10:19 AM
To: CRAN-sysadmin at R-project.org <CRAN-sysadmin at R-project.org>
Subject: Serious problem with R on macOS
Hello,
For a few months now, I?ve been having an odd and rather annoying problem. I use RStudio and it frequently cannot start R, producing the error message attached below. This is clearly not the, as I worked on it the night before or even just a few hours earlier. What is clear is that R is not available on my system, although all the files are still there (in /Library/Frameworks/R.framework). It could be that a critical file becomes corrupted, or the system can?t find it. I have not been able to determine whether that is the case, or which file could be affected. I might have re-installed R dozens of times in the last month. This is something that never happened in the previous more than 15 years of using R.

I?ve tried everything I can think of, and the problem persists?and haven?t found any satisfactory feedback online either.
Have you ever heard of a problem like this? Or do you have any suggestions?

Thank you so much for your support.


[A screenshot of a computer error message  Description automatically generated with low confidence]



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230605/04979993/attachment-0001.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33129 bytes
Desc: image001.png
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230605/04979993/attachment-0001.png>
#
Aloha.

My first thought is to check and see if you can run R from the 
command-line.? My second thought is to create a new user and re-install 
R under that user and see if it's your user environment or something 
system-wide.

Good luck.
J.
On 6/5/23 08:32, DePaolis, Fernando wrote:

  
    
#
If you can use R.app or R on the terminal, it is a R studio bug.  Have you tested?  Also, ?reinstall? works best after removing all actual files, such as the whole ~/.R, all the ~/.R* files, and whatever R studio might add.

BW

F

Federico Calboli
Tutkija
Genomiikka ja jalostus
Luonnonvarakeskus

Uwe Ligges (from CRAN sys admin) recommended that I post this to the list.

Thank you.



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: DePaolis, Fernando <fdepaolis at middlebury.edu>
Date: Monday, June 5, 2023 at 10:19 AM
To: CRAN-sysadmin at R-project.org <CRAN-sysadmin at R-project.org>
Subject: Serious problem with R on macOS
Hello,
For a few months now, I?ve been having an odd and rather annoying problem. I use RStudio and it frequently cannot start R, producing the error message attached below. This is clearly not the, as I worked on it the night before or even just a few hours earlier. What is clear is that R is not available on my system, although all the files are still there (in /Library/Frameworks/R.framework). It could be that a critical file becomes corrupted, or the system can?t find it. I have not been able to determine whether that is the case, or which file could be affected. I might have re-installed R dozens of times in the last month. This is something that never happened in the previous more than 15 years of using R.

I?ve tried everything I can think of, and the problem persists?and haven?t found any satisfactory feedback online either.
Have you ever heard of a problem like this? Or do you have any suggestions?

Thank you so much for your support.


[A screenshot of a computer error message  Description automatically generated with low confidence]



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230606/606812d5/attachment-0001.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33129 bytes
Desc: image001.png
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230606/606812d5/attachment-0001.png>
#
On 05.06.2023 20:32, DePaolis, Fernando wrote:
But he did not suggest to post in html nor to post the same mail again 
after he asked you whether you can start R without R Studio. And he 
alkso aksed you to ask here only if R also fails to start without RStudio.

Uwe Ligges
#
On 05.06.2023 20:32, DePaolis, Fernando wrote:
But he did not suggest to post in html

If anyone is using the Apple store Outlook (as I am forced to do), there is no way I can see I can specify to send plain text messages.  This is OT, but sending html mail might not be due to willful ignorance of netiquette.

BW

F



nor to post the same mail again
after he asked you whether you can start R without R Studio. And he
alkso aksed you to ask here only if R also fails to start without RStudio.

Uwe Ligges
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at r-project.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mac&data=05%7C01%7Cfederico.calboli%40luke.fi%7C48dc5c6fa7d64d5c6ccd08db666a82ab%7C7c14dfa4c0fc47259f0476a443deb095%7C0%7C0%7C638216379935416394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5csS2lzYA3WyVZg40tHHxY39%2BMXw1sRsRbG59sZHzCU%3D&reserved=0<https://stat.ethz.ch/mailman/listinfo/r-sig-mac>
#
I had thought there was an obvious way to send plain text from Outlook, but when I saw this I checked. All I could find is an option to reply to messages in the same format received. It may be possible to send plain text from Outlook but it is certainly not obvious how. I sent this from the Apple mail client to get plain text.

Apologies to the list for a second OT post in this thread, but I thought some confirmation might be valuable.

  
    
#
Thank you all?it is not an RStudio issue. I cannot run R from its app or the command line?It is certainly an R issue.
Next time it ?uninstalls itself? I will try to install it on another user and see what happens (although I have already tried to install it ?just for me? or for all users).

Thank you again,


Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: Calboli Federico (LUKE) <federico.calboli at luke.fi>
Date: Tuesday, June 6, 2023 at 12:54 AM
To: DePaolis, Fernando <fdepaolis at middlebury.edu>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: Serious problem with R on macOS
You don't often get email from federico.calboli at luke.fi. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
If you can use R.app or R on the terminal, it is a R studio bug.  Have you tested?  Also, ?reinstall? works best after removing all actual files, such as the whole ~/.R, all the ~/.R* files, and whatever R studio might add.

BW

F

Federico Calboli
Tutkija
Genomiikka ja jalostus
Luonnonvarakeskus

Uwe Ligges (from CRAN sys admin) recommended that I post this to the list.

Thank you.



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.middlebury.edu%2Finstitute&data=05%7C01%7Cfdepaolis%40middlebury.edu%7C5542d3f00bbc48c2f08408db66634fb3%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C638216348966308561%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jPUL7rVaeylLyvxYHvA53PlePdTwrogwM2yM686hOJ4%3D&reserved=0> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: DePaolis, Fernando <fdepaolis at middlebury.edu>
Date: Monday, June 5, 2023 at 10:19 AM
To: CRAN-sysadmin at R-project.org <CRAN-sysadmin at R-project.org>
Subject: Serious problem with R on macOS
Hello,
For a few months now, I?ve been having an odd and rather annoying problem. I use RStudio and it frequently cannot start R, producing the error message attached below. This is clearly not the, as I worked on it the night before or even just a few hours earlier. What is clear is that R is not available on my system, although all the files are still there (in /Library/Frameworks/R.framework). It could be that a critical file becomes corrupted, or the system can?t find it. I have not been able to determine whether that is the case, or which file could be affected. I might have re-installed R dozens of times in the last month. This is something that never happened in the previous more than 15 years of using R.

I?ve tried everything I can think of, and the problem persists?and haven?t found any satisfactory feedback online either.
Have you ever heard of a problem like this? Or do you have any suggestions?

Thank you so much for your support.


[A screenshot of a computer error message  Description automatically generated with low confidence]



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.middlebury.edu%2Finstitute&data=05%7C01%7Cfdepaolis%40middlebury.edu%7C5542d3f00bbc48c2f08408db66634fb3%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C638216348966308561%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jPUL7rVaeylLyvxYHvA53PlePdTwrogwM2yM686hOJ4%3D&reserved=0> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230606/aaa96eec/attachment-0001.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33129 bytes
Desc: image001.png
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20230606/aaa96eec/attachment-0001.png>
#
OK, so

- OS version?
- What do you do to install?
- What happens when you do it?

e.g.:

- Monterey 12.6.5
- Downloaded R-4.3.0-x86_64.pkg from CRAN
- As user with admin privilege, open from Downloads folder and follow instructions
- "The installation was succesful"
- Close, move to bin.

I gather that on newer OS, you may need to move the installer out of Downloads first.
 

-pd

  
    
#
OS: Ventura 13.4 (22F66)
Downloaded R-4.3.0-x86_64.pkg from CRAN
Installation: Successful?everything works fine
Suggestion to move the installer to Trash: Declined (because I know I will need the installer again).
CRAN suggests reinstalling Xquartz, which I did a few times on the onset of the symptoms (I don?t do that anymore because there sems to be no point to it).
Use: I only use RStudio and everything works fine, until at a random time a few days later (or hours in a few instances), RStudio fails to ?find R?, which doesn?t run on its own or from the console.
Possible emerging conflicts: At the beginning, I thought this could be happening because other software were install afterward, but that is not the case.
Looked for alternatives: I couldn?t find any reference online, so I suspect this is quite specific to my machine and/or environment. About the ?environment?, I cannot think of anything, as no changes have been made, except for routine updates (which is unlikely, but not impossible to have undesirable effects).


Thank you



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: peter dalgaard <pdalgd at gmail.com>
Date: Tuesday, June 6, 2023 at 8:48 AM
To: DePaolis, Fernando <fdepaolis at middlebury.edu>
Cc: Calboli Federico (LUKE) <federico.calboli at luke.fi>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
[You don't often get email from pdalgd at gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

OK, so

- OS version?
- What do you do to install?
- What happens when you do it?

e.g.:

- Monterey 12.6.5
- Downloaded R-4.3.0-x86_64.pkg from CRAN
- As user with admin privilege, open from Downloads folder and follow instructions
- "The installation was succesful"
- Close, move to bin.

I gather that on newer OS, you may need to move the installer out of Downloads first.


-pd
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
#
Hum...

Best I can think of is to take the hint (from Simon Urbanek) and move the .pkg file from Downloads and into another folder before installing. Some system cleaner-upper or virus checker could be moving stuff around. You haven't perchance some virus scrubber running which might be restoring your executable directories to a previous state?

You might want to make a note of the location and ownership of installed files, like in

Peters-Air:R pd$ ls -l `which R`
lrwxr-xr-x  1 root  wheel  47 Jun  6 17:41 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
Peters-Air:R pd$ ls -l /Library/Frameworks/R.framework/Resources/bin/R
-rwxrwxr-x  1 root  admin  9196 Apr 21 23:47 /Library/Frameworks/R.framework/Resources/bin/R

and then, if/when it stops working, see if files have disappeared or changed owner or permissions.

-pd

  
    
#
Thank you!! I will do that.

PS: No, no additional or different scrubbers/antivirus/etc have been added.



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: peter dalgaard <pdalgd at gmail.com>
Date: Tuesday, June 6, 2023 at 9:50 AM
To: DePaolis, Fernando <fdepaolis at middlebury.edu>
Cc: Calboli Federico (LUKE) <federico.calboli at luke.fi>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
[You don't often get email from pdalgd at gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hum...

Best I can think of is to take the hint (from Simon Urbanek) and move the .pkg file from Downloads and into another folder before installing. Some system cleaner-upper or virus checker could be moving stuff around. You haven't perchance some virus scrubber running which might be restoring your executable directories to a previous state?

You might want to make a note of the location and ownership of installed files, like in

Peters-Air:R pd$ ls -l `which R`
lrwxr-xr-x  1 root  wheel  47 Jun  6 17:41 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
Peters-Air:R pd$ ls -l /Library/Frameworks/R.framework/Resources/bin/R
-rwxrwxr-x  1 root  admin  9196 Apr 21 23:47 /Library/Frameworks/R.framework/Resources/bin/R

and then, if/when it stops working, see if files have disappeared or changed owner or permissions.

-pd
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
#
Hi,

I see you've gotten all kinds of R-specific suggestions and feedback,
but I wonder if this might be a more fundamental problem related to
the "This file cannot be found" bug that is persisting in Mac OS

cf https://forums.macrumors.com/threads/updated-to-13-1-and-now-file-cant-be-found.2373951/

I haven't encountered this problem with applications, but certainly it
has been a pesky problem with files.

Usually trying again resolves it for files.

Sarah

On Tue, Jun 6, 2023 at 3:30?AM DePaolis, Fernando
<fdepaolis at middlebury.edu> wrote:

  
    
#
Thank you, Sarah. Yes, I considered this issue and continue my investigation... eagerly awaiting an OS update/upgrade that may address it.
Thank you.


Fernando DePaolis
Dean of Academic Operations & Integration
Middlebury Institute of International Studies

Sent from an iOS device. Apologies for any typos.
#
NOTE: I only have the problem with R. No other app or file has been impacted. That's why I started the R route.

Fernando DePaolis
Dean of Academic Operations & Integration
Middlebury Institute of International Studies

Sent from an iOS device. Apologies for any typos.
#
Fernando,

I don't think you posted the error you get when running R on the command line - can you copy/paste what you get when running R in the Terminal? Similarly, do you also get an error when running the R app (in Applications)?

Cheers,
Simon
#
Hi Simon,
You're right, I didn't post it...I'll make sure I do next time it happens...it's working fine for now...

Thank you.



Fernando DePaolis
Dean Of Academic Operations & Integration
Middlebury Institute of International Studies

Sent from Outlook for iOS<https://aka.ms/o0ukef>. Apologies for any typos.
#
?well?here it goes again?it failed just now. This is the message I get when I try to run R from the command line on my mac


fernandodepaolis at MacBook-Pro-2 ~ % R



R version 4.3.0 (2023-04-21) -- "Already Tomorrow"

Copyright (C) 2023 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin20 (64-bit)



R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.



  Natural language support but running in an English locale



R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.



Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.



During startup - Warning message:

package ?datasets? in options("defaultPackages") was not found

Error in loadNamespace(name) : object 'pkgInfo' not found

In addition: Warning message:

In loadNamespace(name) : package ?compiler? has no 'package.rds' in Meta/

Fatal error: unable to initialize the JIT



There was no ?message? of any sort when trying to run R.app. There was a brief flickering (like quick blinking) but nothing else.

Thank you!


Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: DePaolis, Fernando <fdepaolis at middlebury.edu>
Date: Wednesday, June 7, 2023 at 9:13 PM
To: Simon Urbanek <simon.urbanek at R-project.org>
Cc: r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
Hi Simon,
You're right, I didn't post it...I'll make sure I do next time it happens...it's working fine for now...

Thank you.



Fernando DePaolis
Dean Of Academic Operations & Integration
Middlebury Institute of International Studies

Sent from Outlook for iOS<https://aka.ms/o0ukef>. Apologies for any typos.
#
This is what I get after the current failure, where neither R.app nor the call from the command line work.


fernandodepaolis at MacBook-Pro-2 ~ % ls -l `which R`

lrwxr-xr-x  1 root  admin  47 Jun  5 10:23 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R


fernandodepaolis at MacBook-Pro-2 ~ % ls -l /Library/Frameworks/R.framework/Resources/bin/R

-rwxrwxr-x  1 root  admin  9196 Apr 21 14:47 /Library/Frameworks/R.framework/Resources/bin/R



which is identical to what I got when it was working fine a couple of days ago.

Thank you



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: DePaolis, Fernando <fdepaolis at middlebury.edu>
Date: Tuesday, June 6, 2023 at 10:20 AM
To: peter dalgaard <pdalgd at gmail.com>
Cc: Calboli Federico (LUKE) <federico.calboli at luke.fi>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
Thank you!! I will do that.

PS: No, no additional or different scrubbers/antivirus/etc have been added.



Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: peter dalgaard <pdalgd at gmail.com>
Date: Tuesday, June 6, 2023 at 9:50 AM
To: DePaolis, Fernando <fdepaolis at middlebury.edu>
Cc: Calboli Federico (LUKE) <federico.calboli at luke.fi>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
[You don't often get email from pdalgd at gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hum...

Best I can think of is to take the hint (from Simon Urbanek) and move the .pkg file from Downloads and into another folder before installing. Some system cleaner-upper or virus checker could be moving stuff around. You haven't perchance some virus scrubber running which might be restoring your executable directories to a previous state?

You might want to make a note of the location and ownership of installed files, like in

Peters-Air:R pd$ ls -l `which R`
lrwxr-xr-x  1 root  wheel  47 Jun  6 17:41 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
Peters-Air:R pd$ ls -l /Library/Frameworks/R.framework/Resources/bin/R
-rwxrwxr-x  1 root  admin  9196 Apr 21 23:47 /Library/Frameworks/R.framework/Resources/bin/R

and then, if/when it stops working, see if files have disappeared or changed owner or permissions.

-pd
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
#
On Thu, Jun 8, 2023 at 10:43?AM DePaolis, Fernando <fdepaolis at middlebury.edu>
wrote:
logs, which might have some useful hints about what is actually failing, or
leading up to the failure.
#
This is what I got when trying to run R from the console




R version 4.3.0 (2023-04-21) -- "Already Tomorrow"

Copyright (C) 2023 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin20 (64-bit)



R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.



  Natural language support but running in an English locale



R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.



Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.



During startup - Warning message:

package ?datasets? in options("defaultPackages") was not found

Error in loadNamespace(name) : object 'pkgInfo' not found

In addition: Warning message:

In loadNamespace(name) : package ?compiler? has no 'package.rds' in Meta/

Fatal error: unable to initialize the JIT





Fernando DePaolis, Ph.D.
Dean of Academic Operations & Integration
Associate Professor
Middlebury Institute of International Studies<http://www.middlebury.edu/institute> at Monterey
----------------------------------------------------------------------
[Sent from Outlook for Mac ?MacBook Pro]
My working hours (US Pacific time zone) may not be your working hours. Please do not feel obligated to respond outside your normal work hours, unless otherwise indicated.

From: Keith Bierman <khbkhb at gmail.com>
Date: Thursday, June 8, 2023 at 9:51 AM
To: DePaolis, Fernando <fdepaolis at middlebury.edu>
Cc: peter dalgaard <pdalgd at gmail.com>, r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Serious problem with R on macOS
You don't often get email from khbkhb at gmail.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
On Thu, Jun 8, 2023 at 10:43?AM DePaolis, Fernando <fdepaolis at middlebury.edu<mailto:fdepaolis at middlebury.edu>> wrote:
This is what I get after the current failure, where neither R.app nor the call from the command line work.


fernandodepaolis at MacBook-Pro-2 ~ % ls -l `which R`

lrwxr-xr-x  1 root  admin  47 Jun  5 10:23 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
....
If you open up the "Console" app you should have access to the system logs, which might have some useful hints about what is actually failing, or leading up to the failure.
#
Not clear why there is a symbolic link.? Maybe try using the fullpath 
name to invoke R and see if that works.? It seems to me that 
'sometimes', on OSX, some symbolic links behave oddly.? This may be 
related to the Privacy/Security settings but I don't have any clear 
understanding of what's going on.

J.
On 6/8/23 06:37, DePaolis, Fernando wrote:

  
    
#
The symbolic link is the standard way R is installed on a Mac.  It's 
installed as a "framework", but the symlink in /usr/local/bin/R makes 
Unix-like tools see it as a standard program, which is what you want 
from the terminal.

The warnings and errors Fernando was seeing, like

   package ?datasets? in options("defaultPackages") was not found

make it look as though the framework is broken.  I have no idea how that 
would happen.  Maybe he'll learn more by running

.libPaths()

in R. It should print something like

[1] "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library"

but maybe not identical to that.  Running ls on that directory in the 
terminal should list all the installed packages (including datasets and 
everything else that is supposed to be installed).

Duncan Murdoch
On 08/06/2023 3:16 p.m., John Helly via R-SIG-Mac wrote:
#
Yes, this is consistent with the fact that R starts for you. Some other files seem to have gone missing though, notably the datasets and compiler package, so that R does not get very far before givinng up the ghost.

The pattern of recently created files disappearing is worrying, but not likely due to anything that R itself is doing. It is quite possible that you have a disk error, either physical or logical (inconsistent file system state), or it could be the OS error that Sarah was alluding to. You might want to try the First Aid option in the Disc Utility app (possibly enlist a local expert).

- Peter

  
    
#
On 6/8/23 09:33, DePaolis, Fernando wrote:
You were advised to try using Disk Utility / First Aid. Have you done so 
yet?

 ?(You are getting intermittent errors accessing base packages. So this 
may just be a flakey disk sector.)
#
Fernando,

that looks like something is deleting files on your disk - that sounds pretty bad. I would probably recommend re-installing a fresh macOS as you may have some malware (or over-eager anti-virus or corporate software?) on your machine. Given that R works after installation it really seems like some issue on your OS and not with R itself.

Cheers,
Simon