2

I'm trying to install the following C POSIX headers in Ubuntu 14.04 but for some reason some of them won't install.

  1. sys/ioctl.h
  2. unistd.h
  3. locale.h
  4. ncursesw/ncurses.h

Commands tried

sudo apt-get install sys/ioctl.h
sudo apt-get install unistd.h
sudo apt-get install locale.h
sudo apt-get install ncursesw/ncruses.h

I've only managed to install locale.h but for some reason the rest return a regex error stating that sys/ioctl.h wasn't found. I'm fairly new to Linux/Ubuntu and are not sure what to do at this point. Any help is appreciated

muru
  • 207,228
pyler
  • 181

2 Answers2

3

The things you have listed are header files - which do not have a one-to-one correspondence with Ubuntu (Debian) packages.

In particular, sys/ioctl.h and sys/unistd.h should both be provided by the libc6-dev package and ncursesw/ncurses.h by the libncursesw5-dev package i.e.

sudo apt-get install libc6-dev libncursesw5-dev

If you haven't already installed the GCC compiler, you can install the build-essential metapackage which includes the compilers as well as libc6-dev

sudo apt-get install build-essential libncursesw5-dev
steeldriver
  • 142,475
1

After more googling, I realized that what I had to do was to install the packages that contained the libraries I was interested in. It wasn't long before I stumbled across these two websites;

  1. Ubuntu
  2. Debian

There you will find the packages of many many libraries. And you can install from any package you want!

muru
  • 207,228
pyler
  • 181