I am trying to install bedtools on windows 10, but I get an error I don't understand. How can I fix it?

Building BEDTools:
Updating version file.
 * Creating BamTools API
- Building in src/utils/FileRecordTools
  * compiling FileRecordMgr.cpp
make[1]: g++: Command not found
Makefile:36: recipe for target '../../../obj//FileRecordMgr.o' failed
make[1]: *** [../../../obj//FileRecordMgr.o] Error 127
Makefile:186: recipe for target 'src/utils/FileRecordTools' failed
make: *** [src/utils/FileRecordTools] Error 2
  • $\begingroup$ Hi there, I suppose you use the bash terminal available at windows 10, is that correct? The error says that you don't have a compiler for c++ called g++. You can try install it by sudo apt-get install g++. Then run make again. $\endgroup$ Commented Mar 5, 2019 at 8:41
  • $\begingroup$ Turns out that something went wrong the first time I tried to install g++, but I didn't see the error message. $\endgroup$
    – DangIt
    Commented Mar 6, 2019 at 20:37

2 Answers 2


My personal advice would be to avoid compiling tools like this if you can avoid it, especially where you are using a "barebones" setup like the one you get with WSL Ubunutu as you'll almost always run into dependency issues.

The linux version of conda installs just fine in WSL and bioconda hae pretty much any bioinformatics package you might need, already compiled.


make1: g++: Command not found

You do not have g++ installed on your machine. This is used to compile the bedtools into an executable file.

Here is a tutorial on installing g++

  • $\begingroup$ If you have admin privileges, the easiest way to install g++ is sudo apt-get install -y build-essential. $\endgroup$ Commented Mar 4, 2019 at 17:38
  • $\begingroup$ @DanielStandage does that work on Windows? I assume the OP is using the newfangled Ubuntu Subsystem for Windows thing, but I don't know if that can install arbitrary packages like that. $\endgroup$
    – terdon
    Commented Mar 4, 2019 at 17:48
  • $\begingroup$ Oops, I missed the "Windows" part and only saw Ubuntu. 🤭 It looks like apt-get is supported though. howtogeek.com/261449/… $\endgroup$ Commented Mar 4, 2019 at 17:51
  • $\begingroup$ I had tried that, but another error popped up without it realizing. However, the following error popped up after entering make, and I can't tell if this is critical for the functionality of bedtools: - Building main bedtools binary. done. - Creating executables for old CLI. /bin/bash: python: command not found Makefile:145: recipe for target 'all' failed make: *** [all] Error 127 $\endgroup$
    – DangIt
    Commented Mar 4, 2019 at 21:49
  • $\begingroup$ Please add the new issue to original post. This is saying that you don't have python installed. I think that if you don't want to use the legacy CLI (command line interface) you should be all set. You can try running bedtools and see if you get a usage prompt. $\endgroup$
    – Bioathlete
    Commented Mar 4, 2019 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.