The name of the package must be quoted and everything will go smoothly like this
> install.packages("ggplot2")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'http://package-proxy/src/contrib/ggplot2_3.3.5.tar.gz'
Content type 'application/x-tar' length 4136214 bytes (3.9 MB)
==================================================
downloaded 3.9 MB
* installing *binary* package ‘ggplot2’ ...
* DONE (ggplot2)
The downloaded source packages are in
‘/tmp/Rtmpr0ssex/downloaded_packages’
If you get a different outcome, please post the complete error message you get.