This is a good overview of the options. It's worth pointing out that there are a lot of successful open source projects out there and most of them are maintained by people that are being paid by companies to do so. It's nonsense that you can't make money of open source, it's an industry that employs quite a few people and the companies that employ them get a lot of value back in return. A lot of that spending is strategic and not charitable. E.g. Google has things like Android. They make a lot of money from Android. And its built on top of a lot of OSS. Instead of passively consuming that, they employ people to work on each of the projects that are important to them and have a very active role in driving those forward. They even create open source projects themselves.

In fact all of the big name software companies have people on staff that represent them in various mission critical open source projects. There are also a lot of smaller companies that are very successful that are built on top of open source projects that they either pioneered or contribute to heavily. Commercial contributions to open source are the back bone to the open source communities.

Any such business is a great place to start if you are looking to make money from open source. They might employ you if you are good enough and having a track record as a top contributor is a great way into such companies. Getting involved with such projects is a great way to bootstrap your professional career in open source development.

Where a lot of amateur run projects fail to make money is mis-perception of their value, unprofessional behavior by developers, or just plain poor business and communication skills. That happens a lot. Computer scientists are not great at this stuff. Also they tend to be a bit spoiled because they are constantly being pampered by companies that need their technical skills. So, not necessarily the best entrepreneurs.

Built it and they will come is not how things work. It's not a business model. Making money is hard work and you have to be smart about it. Just because you think that your source code is worth a lot doesn't mean it actually is. E.g. a lot of javascript packages are a combination of tiny and a bit of a commodity. What's a commodity: something with a lot of alternate implementations. If you are cost conscious consumer of such things, you are going to be optimizing for cost and convenience and pick the cheapest (i.e. free) good enough thing. Commodities are by definition not worth a lot. And in OSS that typically means 0$.

Mistake #1 with OSS companies: most of them provide commodity functionality that just isn't worth a lot to many people. Set your expectations accordingly. There can still be valid reasons to work on them.

I maintain some small open source projects and I've set my expectations accordingly. I don't expect or ask for donations. Below a certain threshold the admin work on my side would cost me more than the amount I'd receive. It makes no economical sense to me to bother with low $ amount tips unless I magically can get a lot of them. For the same reason, I don't donate to OSS projects either. I reserve donations for more worthy causes.

I make money indirectly via consultancy. The libraries are just there to make my life easier and they are a nice talking point that helps my clients understand that I might know what I'm talking about. Most of my clients don't actually use my OSS even. Mainly they just make my life easier. And I enjoy working on them. Nothing wrong with that.