Packages installation process failed on Linux (probably due to missing path in the pkg-config search path)

Debian 10.
R version 3.6.2 (2019-12-12)

install.packages("tidyverse")
...
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=...'
--------------------------------------------------------------------

So exactly same problem.

As a SUDO user I run on terminal:

sudo apt-get install libcurl4-openssl-dev

And I get the next error:
The following packages have unmet dependencies:
libcurl4-openssl-dev : Depends: libcurl4 (= 7.64.0-4) but it is not going to be installed

Then I try to install dependencies:

sudo apt-get install libcurl4

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libblas-dev
libbz2-dev libgfortran3 libjpeg-dev libjpeg62-turbo-dev liblapack-dev
liblzma-dev libminiupnpc17 libnatpmp1 libncurses-dev libncurses5-dev
libpcre16-3 libpcre2-32-0 libpcre2-dev libpcre2-posix0 libpcre3-dev
libpcre32-3 libpcrecpp0v5 libpng-dev libpng-tools libreadline-dev
r-cran-boot r-cran-cluster r-cran-foreign r-doc-html transmission-common
zlib1g-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libcurl3 r-base-core r-base-dev r-cran-class r-cran-codetools
r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix r-cran-mgcv
r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial r-cran-survival
r-recommended
The following NEW packages will be installed:
libcurl4
0 upgraded, 1 newly installed, 16 to remove and 0 not upgraded.

Thus, to install libcurl4-openssl-dev Debian uninstalls R itself, anf if I install R again, Debian uninstall
libcurl4-openssl-dev, and install libcurl3 instead.

Far to be solved ...this question is.

UPDATE

Following this thread https://stackoverflow.com/questions/42115972/configuration-failed-because-libcurl-was-not-found

I downloaded curl-7.55.0.tar.gz, then install from terminal, and everything is OK.