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
  • 197,895
  • 55
  • 485
  • 740
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
  • 136,215
  • 21
  • 243
  • 336
  • Also, if you are trying to build a particular package (say mutt), sudo apt-get build-dep mutt may be what you really want. – gmatht May 18 '17 at 04:58
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
  • 197,895
  • 55
  • 485
  • 740
pyler
  • 181
  • yep, there is a similar site provided Ubuntu, http://packages.ubuntu.com/ , you may [edit] your answer to point to Ubuntu one. BTW, could you accept your own answer as that what works for you, see http://askubuntu.com/help/self-answer & http://askubuntu.com/help/someone-answers – user.dz Nov 25 '15 at 13:26