Please do not post screenshots, it is considered a bad practice here, post the console output as formatted code instead, here is how to do it:
Formatting Code: the Basics
All code or console output you include in your posts should be formatted properly. Luckily, this is very easy to do! Just use the code formatting button at the top of the post editing box:
[image]
Select some code
Click the </> button!
The code formatting button automatically adds special Markdown formatting symbols to whatever you selected. If you check the preview pane to the right of your post, you'll see that the forum software now outputs nicely formatted code .
[04]
The code formatting button is pretty smart! It can tell the difference between snippets of code that are part of a sentence and blocks of code that stand alone. S…
Now about your issue, you are showing a very different error message now
#> free() invalid pointer
#> Aborted
#> ERROR: loading failed
it seems your system has fallen into a bad state I would try restarting the whole thing (Just closing the console doesn't restart WSL2) and trying to install rgdal again.
For Ubuntu 20 the RSPM repository has a different link, you can try with this
install.packages("rgdal", repos=c('https://packagemanager.rstudio.com/all/__linux__/focal/latest', 'https://cran.rstudio.com/'))