GAGE kegg.gsets() self-signed certificate error
0
0
Entering edit mode
Lucas • 0
@35a8d88e
Last seen 2 days ago
United States

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:

  1. Disable the SSL certificate Verification
  2. Install the self-signed certificate and add to the system's trusted certificates
  3. Update the version of R and the package

[Edit] I thought I had the latest version of R for Mac, but 4.4.3 version was released on 2/28/25. However, updating still did not solve my issue (see below).

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
gageData gage • 192 views
ADD COMMENT
0
Entering edit mode

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:

library(curl)
httr::set_config(httr::config(ssl_verifypeer = 0))

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.

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.

R version 4.4.3 (2025-02-28)
Platform: x86_64-apple-darwin20
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.4-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.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] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] org.Hs.eg.db_3.20.0  AnnotationDbi_1.68.0 IRanges_2.40.1       S4Vectors_0.44.0     Biobase_2.66.0      
[6] BiocGenerics_0.52.0  curl_6.2.1           gage_2.56.0         

loaded via a namespace (and not attached):
 [1] bit_4.6.0               jsonlite_1.9.1          compiler_4.4.3          BiocManager_1.30.25    
 [5] crayon_1.5.3            blob_1.2.4              Biostrings_2.74.1       png_0.1-8              
 [9] yaml_2.3.10             fastmap_1.2.0           R6_2.6.1                XVector_0.46.0         
[13] GenomeInfoDb_1.42.3     knitr_1.50              graph_1.84.1            GenomeInfoDbData_1.2.13
[17] DBI_1.2.3               rlang_1.1.5             KEGGREST_1.46.0         cachem_1.1.0           
[21] xfun_0.51               bit64_4.6.0-1           RSQLite_2.3.9           memoise_2.0.1          
[25] cli_3.6.4               zlibbioc_1.52.0         digest_0.6.37           GO.db_3.20.0           
[29] vctrs_0.6.5             evaluate_1.0.3          rmarkdown_2.29          httr_1.4.7             
[33] tools_4.4.3             pkgconfig_2.0.3         htmltools_0.5.8.1       UCSC.utils_1.2.0
ADD REPLY

Login before adding your answer.

Traffic: 812 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6