Problem with installing curl for R package

I am sharing my expereince so that this could help others.
I use R program and when I try to install a package it says curl is not available.

But when you try install it in terminal usinig

sudo apt install curl

You see a output that it is already installed. So, here is the solution

The solution is use the following command in terminal

sudo apt-get install libcurl4-openssl-dev

After this if you install a package he package will install without any problem.