Tidyverse installation Openssl Error Ubuntu 18.04

Hello Folks,
I am new to R.
I installed R and RStudio on my Ubuntu machine. I was also installing a few packages to set up my environment.
I am receiving an error when installing tidyverse.
I am reporting the relevant part below.

installing to /home/andrea/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-openssl/00new/openssl/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/andrea/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-openssl/00new/openssl/libs/openssl.so':
  /home/andrea/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-openssl/00new/openssl/libs/openssl.so: undefined symbol: EVP_PKEY_CTX_set_rsa_keygen_bits
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/andrea/R/x86_64-pc-linux-gnu-library/4.1/openssl’

My problem appears to be different from those often found in other discussions.
Does anyone know what is going on here?
Thanks