3

These are what I type:

apt install libkrb5-dev

After installed successful, I can't find "/usr/include/gssapi.h", which expected installed on last command.

# apt-file list libkrb5-dev
libkrb5-dev: /usr/bin/krb5-config
libkrb5-dev: /usr/include/gssapi.h
libkrb5-dev: /usr/include/gssapi/gssapi.h
libkrb5-dev: /usr/include/gssapi/gssapi_ext.h
# locate gssapi.h
#

I was using ubuntu 18.10 cosmic and package files list is here.

Who can tell me why headers file is not installed? And more How to fix it?

Thx.


root@zfs-gitlab-ci:~# ls /usr/include
aio.h        c++        endian.h    fmtmsg.h   gnu-versions.h  kdb.h       locale.h    mtd        netpacket   proc_service.h  reglib       shadow.h       string.h       tgmath.h     utmp.h            xfs
aliases.h    com_err.h  envz.h      fnmatch.h  grp.h           krb5        malloc.h    net        netrom      profile.h       resolv.h     signal.h       strings.h      thread_db.h  utmpx.h
alloca.h     complex.h  err.h       fstab.h    gshadow.h       krb5.h      math.h      netash     netrose     protocols       rpc          sound          stropts.h      threads.h    values.h
argp.h       cpio.h     errno.h     fts.h      gssapi          langinfo.h  mcheck.h    netatalk   nfs         pthread.h       rpcsvc       spawn.h        sudo_plugin.h  time.h       video
argz.h       crypt.h    error.h     ftw.h      gssapi.h        lastlog.h   memory.h    netax25    nl_types.h  pty.h           sched.h      stab.h         syscall.h      ttyent.h     wait.h
ar.h         ctype.h    et          gawkapi.h  gssrpc          libgen.h    misc        netdb.h    nss.h       pwd.h           scsi         stdc-predef.h  sysexits.h     uchar.h      wchar.h
arpa         dirent.h   execinfo.h  gconv.h    iconv.h         libintl.h   mit-krb5    neteconet  obstack.h   rdma            search.h     stdint.h       syslog.h       ucontext.h   wctype.h
asm-generic  dlfcn.h    fcntl.h     getopt.h   ifaddrs.h       limits.h    mntent.h    netinet    paths.h     re_comp.h       semaphore.h  stdio_ext.h    tar.h          ulimit.h     wordexp.h
assert.h     drm        features.h  glob.h     inttypes.h      link.h      monetary.h  netipx     poll.h      regex.h         setjmp.h     stdio.h        termio.h       unistd.h     x86_64-linux-gnu
byteswap.h   elf.h      fenv.h      gnumake.h  kadm5           linux       mqueue.h    netiucv    printf.h    regexp.h        sgtty.h      stdlib.h       termios.h      utime.h      xen
3
  • 1
    what does ls /usr/include/ display?
    – singrium
    Nov 6, 2018 at 9:59
  • @singrium directory exist.
    – Frank Wang
    Nov 6, 2018 at 10:05
  • 3
    As I can see, the file exists 'gssapi.h' too.
    – singrium
    Nov 6, 2018 at 10:06

1 Answer 1

11

locate is not a real-time search, but uses a file database that gets updated automatically once per day. Therefore it will not display any files that you just installed moments ago.

You can manually update locate's database using:

sudo updatedb

After you ran that, locate should know about all existing files at that point and correctly display the newly installed files.

Other than that, you can use other tools like ls /usr/include/gssapi.h to check if that file is existing.

3
  • once per day Which configuration file can be edited to change that? I don't see any folder /etc/locate...?
    – cat
    Nov 6, 2018 at 17:30
  • 1
    That would be a different question... though I think it'll be answered somewhere in here: askubuntu.com/search?q=locate
    – user459652
    Nov 6, 2018 at 19:07
  • 1
    @cat It's invoked by cron once per day, because it has a script in /etc/cron.daily/mlocate that runs the updatedb command (in a special way that makes sure it doesn't stress the system much). You could e.g. move that script from /etc/cron.daily to /etc/cron.hourly to increase the interval, or add a custom crontab entry for it.
    – Byte Commander
    Nov 6, 2018 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .