Entering edit mode
Hello,
I am running the following code:
library(gage)
library(gageData)
kg.hsa <- kegg.gsets("hsa")
However, this returns the following error:
Error in curl::curl_fetch_memory(url, handle = handle) :
SSL peer certificate or SSH remote key was not OK [rest.kegg.jp]: SSL certificate problem: self-signed certificate
According to the error message, the problem is that the website has a self-signed certificate. I have googled some solutions for this type of error and they suggest the following:
- Disable the SSL certificate Verification
- Install the self-signed certificate and add to the system's trusted certificates
- Update the version of R and the package
I already have the latest version of R for my mac, and I already tried updating the packages. Are the other two solutions the correct way of solving this?
Thank you,
Here is my session info:
sessionInfo( )
R version 4.3.3 (2024-02-29)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.7.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gageData_2.40.0 gage_2.52.0
loaded via a namespace (and not attached):
[1] crayon_1.5.3 vctrs_0.6.5 httr_1.4.7 cli_3.6.4
[5] knitr_1.49 rlang_1.1.5 xfun_0.51 DBI_1.2.3
[9] png_0.1-8 GO.db_3.18.0 bit_4.5.0.1 S4Vectors_0.40.2
[13] RCurl_1.98-1.16 Biostrings_2.70.3 htmltools_0.5.8.1 graph_1.80.0
[17] stats4_4.3.3 KEGGREST_1.42.0 rmarkdown_2.29 Biobase_2.62.0
[21] evaluate_1.0.3 bitops_1.0-9 fastmap_1.2.0 GenomeInfoDb_1.38.8
[25] yaml_2.3.10 IRanges_2.36.0 memoise_2.0.1 compiler_4.3.3
[29] RSQLite_2.3.9 blob_1.2.4 pkgconfig_2.0.3 XVector_0.42.0
[33] rstudioapi_0.17.1 digest_0.6.37 R6_2.6.1 GenomeInfoDbData_1.2.11
[37] AnnotationDbi_1.64.1 tools_4.3.3 bit64_4.6.0-1 zlibbioc_1.48.2
[41] BiocGenerics_0.48.1 cachem_1.1.0
Hello,
I ended up solving the issue by using the first strategy: Disable the SSL certificate Verification.
I used the following code to disable SSL verification:
The IT where I work at could not find a better solution. They reinstalled R to the latest version and updated the packages, but the error was still occurring. Mac R version only goes up to 4.3.3, so I am not sure if that is the issue.
I do not have admin permission, so I could not attempt the second strategy: Install the self-signed certificate and add to the system's trusted certificates. Since IT is the one who decided to disable SSL verification, I am fine with this outcome.