Installing ncurses (to enable installing toolchain into Openwrt)

When building a project, I get an error msg saying that 'ncurses' was not available. I've done a package search for 'ncurses' and there seem to be many hits, although 'opkg install ncurses' does not work. What should I try?

libncurses and/or libncurses-dev, depending on what it's for. Could also be terminfo.

I'm trying to install the OpenWrt Build system on OpenWrt...

You can try all of them, or post the log where the error message occurs.

I tried both but still get

Checking 'ncurses'... failed.

That might be difficult as all the needed dev libraries & packages may not be available, and some require non-standard modification to work, so some toolchain components may be incompatible (and will not be compiled), etc.

Why are you trying to do that?

Openwrt buildroot is meant to be run in a rather normal full Linux.

I'll see how far I get... Don't really like the overhead of 'normal Linux'.

I'll post a list of 'fails' and maybe someone can tell me definitively which won't be installable.

You can try docker in this case, with a minimal linux distro just for running docker.

I also can recommend ready to use VM images start at ~300MB.

I don't really want to start learning another Linux and would prefer to see how far I can get using OpenWrt as a small Linux. I'd much prefer using FreeBSD, but getting the build system installed there is proving a little tricky...

Anyway, does anyone have any more suggestions for getting ncurses working with the build system?

Maybe try my PR:

PS: Just realized you cant apply the PR, since you cant build openwrt...

Making OpenWrt self-hosting (as in OpenWrt can build OpenWrt) would definitely be a great feature, and would actually bring it closer to a "real" distro but it's a long and rather complicated endeavor to port all the required bits and - more importantly - keep them working :slight_smile:

Why would a distro be more real if it can compile itself? I think the most widely used distro is Android, and I don't think it's compiled on Andoid.

Is there any porting involved? I thought it would just be a matter of assembling the required components...

It may just require compiling a list of already existing packages. After all when you run

./scripts/feeds update -a

you get a list of fails.

If you're going for that route you can more or less just run Alpine or ArchArm Linux. While they do lack LUCI and UCI it's going to be pretty much the same thing in the end once you're done porting various libs etc and it'll save you a lot of time.

The easy route would be to install a vanilla Ubuntu into virtuabox or some other virtualisation tool. No hassle and you get a ready system that happily runs the Openwrt build toolchain once you install prerequisites.

You really need the prerequisites from the list mentioned here:

I think that some of the tools listed there do not even exist as Openwrt packages, so you will need to port them and craft suitable Makefile and patches for building them.

1 Like

Even for those that do exist, OpenWrt won't ship the necessary -dev/ -devel packages in binary form - as they're not needed at runtime and have significant space requirements.

1 Like

I'm down to these fails

Checking 'ncurses'... failed.
Checking 'perl-thread-queue'... failed.
Checking 'find'... failed.
Checking 'diff'... failed.
Checking 'seq'... failed.
Checking 'stat'... failed.
Checking 'git'... failed.
Prerequisite check failed. Use FORCE=1 to override.

Any suggestions?

If you know one Linux you most likely know them all.

It is a lot more difficult even for a skilled and experienced person to create a opwnwrt-distro to achieve your goal.

You could in twenty minutes to thirty minutes install xubuntu ( xfce based Ubuntu, so doesn't need much resources and runs on older PCs).

Once installed you could build your firmware using the same instructions used for building from Ubuntu.

You don't need to learn anything new about using Linux that you don't already know from using openwrt command line

Xubuntu is graphical desktop environment. Just point and click. Too easy. All you will need to do is login open a terminal and start following the Ubuntu build instructions for openwrt from developers guide which I assume you have already read because you have got this far.

I haven't used freeBSD for a while but Ubuntu comes in many flavours so you can make your desktop look the same.
If you used KDE desktop then try Kubuntu.
If you used gnome then try ubuntu, and select classic gnome at login if you like.
If you used xfce then Xubuntu.
Check out the Ubuntu websites there are many more.

You can even run from a live CD without installing to try. Or from a USB flash drive 8GB+

It took me longer to read this thread and type this post than to boot a live CD and start building openwrt from a liveUSB. And I would have probably finished building before you reply.

The other thing is you are distracting developers by asking them to hold your hand making your own opwnwrt-linux-distro. Because you don't want to learn another Linux but are happy to create another linux.

Please just use a popular linux distro.

If one day the developers create a full self-hosting openwrt then go ahead and try that. But right now you are out of luck.

Please appreciate that the advice given to you by others in the above post is good advice. Everybody here is happy to encourage you to try new things and learn, the path they have suggested is the correct path.

Happy Coding


OpenWrt did support FreeBSD at some point but given that most GNU software is rather Linux specific it's a bit of a pain to maintain. I did look into this briefly a few years back and came to the conclusion that it wasn't worth the effort especially since bhyve runs Debian (or whatever you prefer) just fine. I know that there are FreeBSD users here and I'd personally take FreeBSD over Linux any day of the week however there are some shortcomings like wireless support, networking (wired) is great on the other hand. Unless you run NetBSD there are a limited amount of supported platforms however there's ongoing work to expand support.

Linux is "far" better when it comes to platform support and wireless however not so great at others so both have their pros and cons.

I honestly doubt you're going to convince your average FreeBSD that "Linux" is better in general, it's two different ideologies even if you exclude the license. Also, it's a bit of a stretch to say that OpenWrt applies to your average Linux distribution...

Just install Debian and use apt-get, it's really nothing more you need to "learn" to get it going.

1 Like