1

这篇文章清楚地表明该函数bq_auth()应用于在 R 中对 BigQuery 进行身份验证。但是,我创建了一个 BigQuery-Admin 服务帐户,下载了一个服务帐户密钥,并将该密钥传递给了该bq_auth()函数,但我继续收到错误:

> bigrquery::bq_auth(path = '/Users/nicholas/Downloads/just_downladed_this_key.json')
trying token_fetch()
trying credentials_service_account()
adding 'userinfo.email' scope
Error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so, 6): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so
  Reason: image not found
trying credentials_app_default()
file exists at ADC path: /Users/nicholas/.config/gcloud
Error: parse error: premature EOF

                     (right here) ------^

trying credentials_gce()
Error: argument is of length zero
trying credentials_byo_oauth()
Error: inherits(token, "Token2.0") is not TRUE
trying credentials_user_oauth2()
Gargle2.0 initialize
attempt from: bigrquery
adding 'userinfo.email' scope
loading token from the cache
Error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so, 6): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/openssl/libs/openssl.so
  Reason: image not found

看起来我手上有一个 openssl / libssl 问题......

4

1 回答 1

1

在 R 中重新安装openssl库,然后重新启动 R,就可以了。运行options(gargle_quiet = FALSE)以暴露错误日志才是真正的诀窍,因为它暴露了问题。

于 2020-04-23T04:55:05.303 回答