Articles in this section

Unable to install 360 Monitoring under Plesk server: compile your code error: command 'gcc' failed

Plesk 360 Platform 360

Symptoms

  • Unable to install 360 Monitoring under Plesk server:

    Failed to install or update agent360.
    Execution exec has failed with exit code 1, stdout: Collecting agent360
    Using cached https://files.pythonhosted.org/packages...
    Requirement already up-to-date: netifaces in /usr/local/lib64/python3.6/site-packages (from agent360)
    Collecting psutil (from agent360)
    Using cached https://files.pythonhosted.org/packages...
    Requirement already up-to-date: distro in /usr/local/lib/python3.6/site-packages (from agent360)

    psutil/arch/posix/init.c:73:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; posix_methods[i].ml_name != NULL; i++) { ^ psutil/arch/posix/init.c:73:5: note: use option -std=c99 or -std=gnu99 to compile your code error: command 'gcc' failed with exit status 1 Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-u33exdzv/psutil/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-sygzx1i6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-u33exdzv/psutil/

  • Outdated OS like CentOS 7 is in use.

Cause

Outdated Python modules which do not allow psutil installation.

Resolution

  1. Connect to the server via SSH.
  2. Upgrade pip, setuptools, wheel tools using this command:

    # python3 -m pip install --upgrade pip setuptools wheel

  3. Install psutil Python module:

    # pip3 install --upgrade psutil

  4. Install agent360 using Plesk UI at Monitoring page.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.