PMetrics on Catalina

Issues related to the installation of Pmetrics and getting it to run on your system.
Post Reply
markushovd
Posts: 2
Joined: Wed Dec 05, 2018 6:25 am

PMetrics on Catalina

Post by markushovd » Mon Jan 27, 2020 8:06 am

Hi,

Upon trying to install Pmetrics on Mac (Catalina) in a fresh R-environment, I get the following message in Rstudio after installing R:

Code: Select all

> library(Pmetrics)
Error: package or namespace load failed for ‘Pmetrics’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Pmetrics/libs/Pmetrics.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Pmetrics/libs/Pmetrics.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Pmetrics/libs/Pmetrics.so
  Reason: image not found
However, I am able to run PMetrics in the Terminal.

The output of Sys.getenv("PATH") is the same in both instances.
I have attempted to install PMetrics both from url and locally, to no avail. Is this a known error?

A colleague of mine is experiencing the same error following upgrade to Catalina.

markushovd
Posts: 2
Joined: Wed Dec 05, 2018 6:25 am

Re: PMetrics on Catalina

Post by markushovd » Sun Feb 02, 2020 7:33 am

This issue was resolved by copying the folder .../Versions/3.6/ and renaming it to 3.1. However, I'm unsure if this could cause problems down the line with other packages, but it seems to work for now.

User avatar
mneely
Site Admin
Posts: 235
Joined: Tue Nov 08, 2011 11:08 am
Contact:

Re: PMetrics on Catalina

Post by mneely » Sun Feb 02, 2020 7:36 am

This is a permissions issue on Catalina and we are working on a permanent fix. In the meantime, please open a Terminal in your computer (Launchpad -> Other -> Terminal) and run the following command. You can copy this text and paste it into Terminal.

install_name_tool -change /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR.dylib /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Pmetrics/libs/Pmetrics.So

Post Reply