Application build fails with linker error "cannot find -lncurses"

Solution Verified - Updated -

Issue

  • Compiling application fails at linking stage with cannot find -lncurses error.

    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../libncurses.so when searching for -lncurses
    /usr/bin/ld: skipping incompatible /usr/lib/libncurses.so when searching for -lncurses
    /usr/bin/ld: cannot find -lncurses
    collect2: ld returned 1 exit status
    make[1]: *** [product_timestamp] Error 1
    

Environment

  • Red Hat Enterprise Linux
  • gcc
  • ncurses

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content