Compiler Issue with Pycrypto - configure: error: cannot run C compiled programs

Is there a way to see all the dependencies installed? I’ve used yum groupinstall "Development tools" with no luck.

-bash-4.2$ yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
-bash-4.2$ yum groupinstall "Development tools"
Loaded plugins: fastestmirror
You need to be root to perform this command.
-bash-4.2$ sudo yum groupinstall "Development tools"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * epel: mirror.cogentco.com
 * extras: mirror.datto.com
 * updates: mirror.symnds.com
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update

did you try what have been suggested in the output
yum groups mark install "Development Tools" yum groups mark convert "Development Tools yum groupinstall "Development Tools"

and btw CentOS7 forums will find better help for you issue

Okay so I tried a yum update and I seem to be moving forward. I’m now getting

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "file (/home/boshi) is absent, cannot continue", "path": "/home/boshi", "state": "absent"}

-bash-4.2$ sudo python install.py --develop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.cogentco.com
 * extras: mirror.cogentco.com
 * updates: mirror.us.leaseweb.net
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.cogentco.com
 * extras: mirror.cogentco.com
 * updates: mirror.us.leaseweb.net
Package epel-release-7-8.noarch already installed and latest version
Package redhat-lsb-core-4.1-27.el7.centos.1.x86_64 already installed and latest version
Package git-1.8.3.1-6.el7_2.1.x86_64 already installed and latest version
Package python-setuptools-0.9.8-4.el7.noarch already installed and latest version
Package python-devel-2.7.5-34.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.1e-51.el7_2.5.x86_64 already installed and latest version
Package libffi-devel-3.0.13-16.el7.x86_64 already installed and latest version
Nothing to do
Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages
Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
Collecting ansible==2.0.2.0
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6 in /usr/lib64/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/lib64/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/lib64/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=1.1 in /usr/lib64/python2.7/site-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/lib/python2.7/site-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/lib64/python2.7/site-packages (from jinja2->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /usr/lib64/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible==2.0.2.0)
Installing collected packages: ansible
  Found existing installation: ansible 2.1.1.0
    Uninstalling ansible-2.1.1.0:
      Successfully uninstalled ansible-2.1.1.0
Successfully installed ansible-2.0.2.0
Cloning into '/tmp/.bench'...
remote: Counting objects: 165, done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 165 (delta 3), reused 102 (delta 1), pack-reused 0
Receiving objects: 100% (165/165), 7.06 MiB | 7.83 MiB/s, done.
Resolving deltas: 100% (3/3), done.
 [WARNING]: provided hosts list is empty, only localhost is available


PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Create user] *************************************************************
changed: [localhost]

TASK [Set home folder perms] ***************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "file (/home/boshi) is absent, cannot continue", "path": "/home/boshi", "state": "absent"}

NO MORE HOSTS LEFT *************************************************************
       	to retry, use: --limit @develop/create_user.retry

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 342, in <module>
    install_bench(args)
  File "install.py", line 98, in install_bench
    run_playbook('develop/create_user.yml', extra_vars=extra_vars)
  File "install.py", line 292, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'develop/create_user.yml', '-e', '@/tmp/extra_vars.json']' returned non-zero exit status 2

hmm what kind of user u are using for installing? does the user have home directory?

Created the /home/boshi directory and wallah. But now I’m presented with a new issue. I’ve looked around the site but haven’t found anything that helps yet.

During the install I get to:

Please enter mysql root password:
Re-enter mysql root password:
Please enter Administrator password:

I’m thinking maybe I’m entering the wrong passwords. So I changed the mysql root password. But still no access. I’m assuming it’s not a password issue. Which ‘admin’ password is the script asking for?

This appears after I enter the password fields. I don’t think it’s an issue with the passwords, it may have something to do with the user, but what? Not sure.

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["mysqladmin", "-u", "root", "password", "pass"], "delta": "0:00:00.009536", "end": "2016-08-16 15:36:22.100591", "failed": true, "rc": 1, "start": "2016-08-16 15:36:22.091055", "stderr": "\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Access denied for user 'root'@'localhost' (using password: NO)'", "stdout": "", "stdout_lines": [], "warnings": []}
       	to retry, use: --limit @develop/install.retry

PLAY RECAP *********************************************************************
localhost                  : ok=19   changed=2    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 342, in <module>
    install_bench(args)
  File "install.py", line 108, in install_bench
    run_playbook('develop/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 292, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'develop/install.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=boshi']' returned non-zero exit status 2

looks like mysql root password is wrong. Try to connect mysql as root user from terminal using password you got from script. if it fails then reset your mysql password (its easy just google it) then try the installer again with correct password

What do you mean by “using password you got from script”?

I mean the you choose for mysql root the first time you ran the script. is this your first time using linux machine?

I will try to help you step by step just to let you know most your issues are related to linux basics, you can get answers just by simply googling what you get in the outputs
Try using
mysql -u root -p
for a password prompt, so you can try the password. if this doesn’t work then you have to reset mysql password refer to this to reset
http://stackoverflow.com/questions/11760177/access-denied-for-root-user-in-mysql-command-line

follow the link I posted above to reset mysql password

REPOSTED UNDER CORRECT REPLY:

I thought I’d login via FTP and poke about a bit. In the directory where I’m trying to install I found the file ‘.my.cnf’.

Opened it with sudo vi .my.cnf and noticed the mysql root password was different from the one I was using. I updated it quite optimistic that I’d solved the problem. But nope. Same error. Is there a way I could delete the cache so I could be sure it’s not just stuck in reverse?

How do I use:
--limit @develop/install.retry?

now if you use
mysql -u root -p

can u access my sql?

Nope. No luck.

-sh-4.2$ mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'local'

you are really not helping here. I already gave you a link above on how to reset your mysql password. why u r not doing it. it won’t take a minute. hope someone else can help u

Sorry @ganas I am/have reset it. Multiple times and multiple different ways. I’ve been at this for days now, reading up online, looking for solutions, trying things out, talking to my host etc. I don’t mean to frustrate you, I’m a beginner.

first stop or shutdown MariaDB
sudo systemctl stop mariadb.service

Next, start MariaDB with unrestricted access so you wouldn’t need password to sign on as the root user.
sudo mysqld_safe --skip-grant-tables --skip-networking &

you can now logon to it without passwords
mysql -u root

Once you’re logged-on, change to the mysql database which store encrypted credentials and privileges for the root user.
use mysql;

Next, run the commands below to change the root password
update user set password=PASSWORD("new password goes here") where User='root';

Then run the commands below to flush or reset the privileges table.
flush privileges;

then exit

Now that the root password is changed so u can stop/start MariaDB server normally like this
sudo systemctl stop mariadb.service sudo systemctl start mariadb.service

now you can login and try your new password
mysql -u root -p

thats all. can’t be more specific

Thanks for all your help @ganas. It turns out the problem wasn’t me, in the end it was the server I purchased. I’ve switched to a fresh server with nothing installed. I’m still having an error here and there but they are easier to research

login to mysql root

sudo mysql -u root

no password prompt required, if it is using unix socket authentication (used by mariadb provided by distro)

mysql prompt:

use mysql;
update user set plugin='' where User='root';
update user set password=PASSWORD("new password goes here") where User='root';
flush privileges;
exit

it will start working with password authentication.

When the docs say “Install on a clean server”. I now know that means absolutely nothing on the server. I had installed Plesk before I installed ERPNext and it caused issues with root access. I guess because Plesk hijacks the ‘root’ permissions. Making it almost impossible to change my password (My theory).

In the end I was able to install without any issues at all once I removed Plesk, reverted the server to default, and installed ERPNext immediately after.

Now - This brings me to a new issue that I’m looking for help understanding. Is there a way Plesk and ERPNext could live on the same server together or must they be different servers? If not, why? I opened another thread specifically for this - Simple Installation Step Guide

Thanks!