edgeR and DESeq2 are Bioconductor packages, so they can’t be installed from CRAN using the usual
install.packages() method. Please see their Bioconductor pages for installation instructions:
If you haven’t used Bioconductor packages before, it’s also worth making sure you understand how the Bioconductor package, repository and additional packages work, and how things differ from regular R in Bioconductor-land. Start here: https://bioconductor.org/install/
It’s especially important to make sure that you are running “matching” releases of R and Bioconductor when using Bioconductor packages. Unless you have a very good reason for running an older version of R (and understand how to match that to the appropriate Bioconductor release and package versions), I’d strongly recommend updating R to the latest version and reinstalling Bioconductor (from the instructions above) before going further.