MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

Posts Tagged ‘cannot run C compiled programs’

[Solved] configure: error: cannot run C compiled programs.

Posted by Venkatt Guhesan on September 6, 2015

Common error when you run configure before make && make install:

checking whether the C compiler works… configure: error: in `/root/downloads/libzmq-master’:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `-host’.

Add the following into your /root/.bashrc or /home/{username}/.bashrc

export CPATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib
export LD_RUN_PATH=/usr/local/lib

Logout and login to reinitialize .bashrc or do the following:

source /root/.bashrc
# or
source /home/{username}/.bashrc

Return back to running “configure” and that should get you past the error.

Cheers

Posted in C - C++ - gcc - cpp, Kernel | Tagged: | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 149 other followers