Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: configure: error: cannot run C compiled programs

  1. #1
    Join Date
    Jul 2010
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    configure: error: cannot run C compiled programs

    when trying to install program by compiling it that what i got:

    Code:
    sudo sh configure
    
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... configure: error: in `/media/pro-gam/2-my-download/cairo-dock-2.1.0':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    i see in my ubuntu installed software that there is a g++ installed in my pc.

    ??!!

  2. #2
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,995
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: configure: error: cannot run C compiled programs

    You should never `configure` or `make` with `sudo`,
    only `make install` may require admin privilege - and not even then
    if you are installing to your own personal software collection.

    Make sure you have the "build-essential" package installed.

    And, again, the conventional build looks like:
    Code:
    ./configure
    make
    sudo make install
    Give me Free Software or Give me Death!

  3. #3
    Join Date
    Jul 2010
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: configure: error: cannot run C compiled programs

    Thanks to you MR.asmoore82

    Quote Originally Posted by asmoore82 View Post
    You should never `configure` or `make` with `sudo`
    i do but:
    Code:
    ./configure
    bash: ./configure: Permission denied
    Quote Originally Posted by asmoore82 View Post
    Make sure you have the "build-essential" package installed.
    Code:
    sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    build-essential is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  4. #4
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,995
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: configure: error: cannot run C compiled programs

    Quote Originally Posted by Dimesh View Post
    Code:
    ./configure
    bash: ./configure: Permission denied
    Excellent! It's really important not to mask other errors…

    Now I'm thinking that either the source code was extracted as `root` or
    is stored on a non-Linux filesystem. Neither of these is ideal.
    Give me Free Software or Give me Death!

  5. #5
    Join Date
    Jul 2010
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: configure: error: cannot run C compiled programs

    Quote Originally Posted by asmoore82 View Post
    Now I'm thinking that either the source code was extracted as `root` or
    is stored on a non-Linux filesystem. Neither of these is ideal.
    Sorry i do not understand Mr.

  6. #6
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: configure: error: cannot run C compiled programs

    Quote Originally Posted by Dimesh View Post
    Sorry i do not understand Mr.
    You extracted the tar file with sudo. Don't do that.

  7. #7
    Join Date
    Jul 2010
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: configure: error: cannot run C compiled programs

    but i did right click and choose extract here
    i do not extract with terminal
    !

  8. #8
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: configure: error: cannot run C compiled programs

    I do this all the time.

    I have created a build directory under my home:
    Code:
    mkdir ~/build
    Change into the directory:
    Code:
    cd ~/build
    Assume I downloaded openssl-1.0.0d.tar.gz and it was saved in my Downloads directory I would extract it to the build directory that you are currently in:
    Code:
    tar zxf ~/Downloads/openssl-1.0.0d.tar.gz
    When you get your command prompt back you will have a directory for the openssl code. CD in to that directory:
    Code:
    cd ~/build/openssl-1.0.0d
    Run the configure script:
    Code:
    ./config
    Make the application:
    Code:
    make
    Install the application (If you want):
    Code:
    sudo make install
    Last edited by hawkmage; February 17th, 2011 at 03:11 AM. Reason: Typo

  9. #9
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: configure: error: cannot run C compiled programs

    Quote Originally Posted by Dimesh View Post
    but i did right click and choose extract here
    i do not extract with terminal
    !
    Did you run nautilus with gksu or something? What does ls -l configure show?

  10. #10
    Join Date
    Jul 2010
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: configure: error: cannot run C compiled programs

    that is :

    Code:
    ahmed@ahmed-Lenovo-G460:~$ cd /media/pro-gam/2-my-download/cairo-dock-2.1.0
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ sudo ./configure
    [sudo] password for ahmed: 
    sudo: ./configure: command not found
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ ./configure
    bash: ./configure: Permission denied
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ sudo sh configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... configure: error: in `/media/pro-gam/2-my-download/cairo-dock-2.1.0':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ ls -l
    total 1462
    -rw------- 1 ahmed ahmed 342469 2009-09-29 15:13 aclocal.m4
    -rw------- 1 ahmed ahmed  12172 2009-09-27 18:09 cairo-dock-package-theme
    -rw------- 1 ahmed ahmed    525 2009-09-27 18:09 cairo-dock.pc.in
    -rw------- 1 ahmed ahmed   3707 2009-06-30 11:21 compile
    -rw------- 1 ahmed ahmed  44892 2008-11-05 03:01 config.guess
    -rw------- 1 ahmed ahmed   2311 2009-09-29 15:13 config.h.in
    -rw------- 1 ahmed ahmed   8623 2011-02-17 17:22 config.log
    -rw------- 1 ahmed ahmed  33387 2008-11-05 03:01 config.sub
    -rw------- 1 ahmed ahmed 511428 2009-09-29 15:13 configure
    -rw------- 1 ahmed ahmed   4474 2009-09-28 10:55 configure.ac
    -rw------- 1 ahmed ahmed   3696 2009-09-27 18:09 copyright
    drwx------ 1 ahmed ahmed   8192 2009-09-30 10:23 data
    -rw------- 1 ahmed ahmed  15936 2009-06-30 11:21 depcomp
    -rw------- 1 ahmed ahmed   1138 2009-09-27 18:09 INSTALL
    -rw------- 1 ahmed ahmed   9233 2009-06-30 11:21 install-sh
    -rw------- 1 ahmed ahmed  22493 2009-09-27 18:09 intltool-extract.in
    -rw------- 1 ahmed ahmed  35219 2009-09-27 18:09 intltool-merge.in
    -rw------- 1 ahmed ahmed  28061 2009-09-27 18:09 intltool-update.in
    -rw------- 1 ahmed ahmed    158 2009-09-27 18:09 launch-cairo-dock-after-compiz
    -rw------- 1 ahmed ahmed  25284 2009-09-27 18:09 LGPL-2
    -rw------- 1 ahmed ahmed  35147 2009-09-27 18:09 LICENSE
    -rw------- 1 ahmed ahmed 243454 2009-01-16 12:58 ltmain.sh
    -rw------- 1 ahmed ahmed    346 2009-09-27 18:09 Makefile.am
    -rw------- 1 ahmed ahmed  23691 2009-09-29 15:13 Makefile.in
    -rw------- 1 ahmed ahmed  11014 2009-06-30 11:21 missing
    drwx------ 1 ahmed ahmed   4096 2009-09-30 10:22 po
    drwx------ 1 ahmed ahmed  28672 2009-09-30 10:22 src
    chmod command does not work

    Code:
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ chmod a+x configure
    ahmed@ahmed-Lenovo-G460:/media/pro-gam/2-my-download/cairo-dock-2.1.0$ ll
    total 1514
    drwx------ 1 ahmed ahmed   4096 2011-02-17 17:22 ./
    drwx------ 1 ahmed ahmed  49152 2011-02-17 03:40 ../
    -rw------- 1 ahmed ahmed 342469 2009-09-29 15:13 aclocal.m4
    -rw------- 1 ahmed ahmed  12172 2009-09-27 18:09 cairo-dock-package-theme
    -rw------- 1 ahmed ahmed    525 2009-09-27 18:09 cairo-dock.pc.in
    -rw------- 1 ahmed ahmed   3707 2009-06-30 11:21 compile
    -rw------- 1 ahmed ahmed  44892 2008-11-05 03:01 config.guess
    -rw------- 1 ahmed ahmed   2311 2009-09-29 15:13 config.h.in
    -rw------- 1 ahmed ahmed   8623 2011-02-17 17:22 config.log
    -rw------- 1 ahmed ahmed  33387 2008-11-05 03:01 config.sub
    -rw------- 1 ahmed ahmed 511428 2009-09-29 15:13 configure
    -rw------- 1 ahmed ahmed   4474 2009-09-28 10:55 configure.ac
    -rw------- 1 ahmed ahmed   3696 2009-09-27 18:09 copyright
    drwx------ 1 ahmed ahmed   8192 2009-09-30 10:23 data/
    -rw------- 1 ahmed ahmed  15936 2009-06-30 11:21 depcomp
    -rw------- 1 ahmed ahmed   1138 2009-09-27 18:09 INSTALL
    -rw------- 1 ahmed ahmed   9233 2009-06-30 11:21 install-sh
    -rw------- 1 ahmed ahmed  22493 2009-09-27 18:09 intltool-extract.in
    -rw------- 1 ahmed ahmed  35219 2009-09-27 18:09 intltool-merge.in
    -rw------- 1 ahmed ahmed  28061 2009-09-27 18:09 intltool-update.in
    -rw------- 1 ahmed ahmed    158 2009-09-27 18:09 launch-cairo-dock-after-compiz
    -rw------- 1 ahmed ahmed  25284 2009-09-27 18:09 LGPL-2
    -rw------- 1 ahmed ahmed  35147 2009-09-27 18:09 LICENSE
    -rw------- 1 ahmed ahmed 243454 2009-01-16 12:58 ltmain.sh
    -rw------- 1 ahmed ahmed    346 2009-09-27 18:09 Makefile.am
    -rw------- 1 ahmed ahmed  23691 2009-09-29 15:13 Makefile.in
    -rw------- 1 ahmed ahmed  11014 2009-06-30 11:21 missing
    drwx------ 1 ahmed ahmed   4096 2009-09-30 10:22 po/
    drwx------ 1 ahmed ahmed  28672 2009-09-30 10:22 src/
    Last edited by Dimesh; February 17th, 2011 at 04:25 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •