• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Cannot install mongodb configure: error: cannot run C compiled programs.

udalmaz

New Pleskian
I am having problem installing mongodb.

GCC is installed and everything seems ok

Code:
[root@distracted-kalam /]# /opt/plesk/php/7.4/bin/pecl install mongodb
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading mongodb-1.8.2.tgz ...
Starting to download mongodb-1.8.2.tgz (1,292,641 bytes)
................................................................................................................................................................................................................................................................done: 1,292,641 bytes
586 source files, building
running: /opt/plesk/php/7.4/bin/phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
building in /tmp/pear-build-rootRi0tuw/mongodb-1.8.2
running: /tmp/mongodb/configure --with-php-config=/opt/plesk/php/7.4/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/pear-build-rootRi0tuw/mongodb-1.8.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: `/tmp/mongodb/configure --with-php-config=/opt/plesk/php/7.4/bin/php-config' failed


Any idea?
 
Try to fix locale settings at least.
I have tried /opt/plesk/php/7.4/bin/pecl install mongodb on my test CentOS 7 Plesk server and it was compiled successfully.
 
Back
Top