A single student can't load Yaml for an assignment

Hello all. Long time listener, first time caller...

I'm teaching an intro R course in Posit Cloud and had a strange thing happen today. I made an assignment and everyone was asked to create an R Markdown file to begin. One student got the following error and wasn't able to load Yaml (yes, it says success but yaml never appeared in her available packages).

We tried:

  • restarting Posit Cloud
  • accessing their account from different machines
  • accessing their assignment from my side (from the instructor view)
  • restarting the R session through R Studio
  • I am currently waiting for them to re-create their instance of the assignment after I trashed it to see if that helps

All resulted in the following error and with no R Markdown document.

Installing 'yaml' for R Markdown...
Installing package into ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'http://rspm/default/__linux__/focal/latest/src/contrib/yaml_2.3.7.tar.gz'
Content type 'application/x-gzip' length 111202 bytes (108 KB)
==================================================
downloaded 108 KB

ERROR: failed to lock directory ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.2/00LOCK-yaml’

The downloaded source packages are in
	‘/tmp/Rtmpylj3Sl/downloaded_packages’


✔ Package 'yaml' successfully installed.
Warning message:
In utils::install.packages("yaml", repos = "http://rspm/default/__linux__/focal/latest") :
  installation of package ‘yaml’ had non-zero exit status

If anyone has any idea what the solution is I am all ears. I also have a message in to Posit Cloud support.

What is "00LOCK-yaml"?

Hi, are you able to navigate to that file and remove the lock file?

1 Like

It's there to prevent a race condition from two processes attempting to write to the same directory at the same time, which actually what may have happened to your student—she was attempting to install at the same time another student was if she was using a shared account. Or just, you know, stuff happening.

1 Like