problem installing car package due to Rio and Curl

hello, everybody! I tried to install car package in RStudio but it gave me back this message. what should i do?

  • installing source package ‘curl’ ...
    ** package ‘curl’ successfully unpacked and MD5 sums checked
    ** using staged installation
    Package libcurl was not found in the pkg-config search path.
    Perhaps you should add the directory containing libcurl.pc' to the PKG_CONFIG_PATH environment variable No package 'libcurl' found Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containinglibcurl.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libcurl' found
    Using PKG_CFLAGS=
    Using PKG_LIBS=-lcurl
    ------------------------- ANTICONF ERROR ---------------------------
    Configuration failed because libcurl was not found. Try installing:
  • deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
  • rpm: libcurl-devel (Fedora, CentOS, RHEL)
  • csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

ERROR: configuration failed for package ‘curl’

  • removing ‘/home/stefano/R/x86_64-pc-linux-gnu-library/3.6/curl’
    Warning in install.packages :
    installation of package ‘curl’ had non-zero exit status
    ERROR: dependency ‘curl’ is not available for package ‘rio’
  • removing ‘/home/stefano/R/x86_64-pc-linux-gnu-library/3.6/rio’
    Warning in install.packages :
    installation of package ‘rio’ had non-zero exit status
    ERROR: dependency ‘rio’ is not available for package ‘car’
  • removing ‘/home/stefano/R/x86_64-pc-linux-gnu-library/3.6/car’
    Warning in install.packages :
    installation of package ‘car’ had non-zero exit status

The downloaded source packages are in
‘/tmp/Rtmp09wSMc/downloaded_packages’

Installation is failing because it can't find the required system dependencies, follow the instructions on the error message and install the system dependency that matches your operating system.