WSL: Can't install `gcc`, can't install `patchelf`

Published: 2020-05-11 23:02:01 -0400 -0400

Reading time: 1 mins (147 words)

Tags: wsl gcc patchelf brew

problem

I just moved back over to Windows and am trying to set up my dev environment on Windows Subsystem for Linux (wsl). In the process of trying to brew install something, I ran into the error gcc must be installed. So I tried to brew install gcc but it threw an error patchelf must be installed. Then I tried to brew install patchelf but it throws the error gcc must be installed! So now I’m confused because I can’t have patchelf without gcc and can’t have gcc without patchelf.

solution

There’s an instruction in the installation guide for homebrew that mentions running sudo apt-get install build-essential. If you run that then you should be able to go ahead and install gcc with homebrew.

Note that if you’re having problems running the install command for build-essential, you should try refreshing the package repos with sudo apt-get update

About the Ham

Hi I'm Hamilton and I wrote / built this! I like doing lots of things, but mostly I like to build (and then share those buildings). Some things I'm currently building: art, software, and prose. To stay up-to-date with my latest buildings, subscribe to my email list or follow one of my many other accounts. #buildit #shipit #justhamit

comments powered by Disqus