Reinstalling Frappie

I first installed the frappie but due to some db problems i deleted the frappie framework folder. Now trying to install but the installation give me the below error.

running build_ext

building ‘_mysql’ extension

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,‘final’,1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o bui$

In file included from _mysql.c:44:0:

/usr/include/mysql/my_config.h:439:0: warning: “HAVE_WCSCOLL” redefined [enabled by default]

#define HAVE_WCSCOLL

^

In file included from /usr/include/python2.7/pyconfig.h:3:0,

             from /usr/include/python2.7/Python.h:8,
             from _mysql.c:29:

/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition

In file included from _mysql.c:44:0:

/usr/include/mysql/my_config.h:654:2: error: error <my_config.h> MUST be included first!

error <my_config.h> MUST be included first!

^

error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1


Cleaning up…
Removing temporary dir /home/sandy/frappe-bench/env/build…
Command /home/sandy/frappe-bench/env/bin/python -c "import setuptools, tokenize;file=‘/home/sandy/frappe-bench/env/build/mysql-python/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’$
Exception information:
Traceback (most recent call last):
File “/home/sandy/frappe-bench/env/local/lib/python2.7/site-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/home/sandy/frappe-bench/env/local/lib/python2.7/site-packages/pip/commands/install.py”, line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File “/home/sandy/frappe-bench/env/local/lib/python2.7/site-packages/pip/req.py”, line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File “/home/sandy/frappe-bench/env/local/lib/python2.7/site-packages/pip/req.py”, line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File “/home/sandy/frappe-bench/env/local/lib/python2.7/site-packages/pip/util.py”, line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /home/sandy/frappe-bench/env/bin/python -c "import setuptools, tokenize;file=‘/home/sandy/frappe-bench/env/build/mysql-python/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).re$

Even tried the bench path mariadb-config. Nothing worked.

Awaiting your reply.

Run sudo bench patch mariadb-config and bench init again. If something doesn’t work, please post the error message.

installing frappe
Compiling /home/sandy/frappe-bench/env/build/gunicorn/gunicorn/workers/_gaiohttp.py ...
  File "/home/sandy/frappe-bench/env/build/gunicorn/gunicorn/workers/_gaiohttp.py", line 64
    yield from self.wsgi.close()
             ^
SyntaxError: invalid syntax

Command /home/sandy/frappe-bench/env/bin/python -c "import setuptools, tokenize;__file__='/home/sandy/frappe-bench/env/build/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1OQdOk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/sandy/frappe-bench/env/include/site/python2.7 failed with error code 1 in /home/sandy/frappe-bench/env/build/mysql-python
Storing debug log for failure in /home/sandy/.pip/pip.log
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/sandy/bench-repo/bench/cli.py", line 35, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/sandy/bench-repo/bench/cli.py", line 102, in init
    no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch)
  File "/home/sandy/bench-repo/bench/utils.py", line 49, in init
    get_app('frappe', frappe_path, branch=frappe_branch, bench=path)
  File "/home/sandy/bench-repo/bench/app.py", line 35, in get_app
    install_app(app, bench=bench)
  File "/home/sandy/bench-repo/bench/app.py", line 53, in install_app
    find_links=find_links))
  File "/home/sandy/bench-repo/bench/utils.py", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'frappe-bench/env/bin/pip install -q  -e frappe-bench/apps/frappe' returned non-zero exit status 1

.pip/pip.log error message which I already posted in my above post. Its completely the same.

Are you running MariaDB 5.5.40?
If it’s possible can you start with a fresh install and use the easy install script?

matiadb version is same 5.5.40.

i am getting below error while patching mariadb.

/home/sandy/bench-repo/bench/patches/fix-mariadb.sh: line 6: mysql_config: command not found
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/sandy/bench-repo/bench/cli.py", line 35, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/sandy/bench-repo/bench/cli.py", line 385, in _patch_mariadb_config
    exec_cmd(os.path.join(repo_dir, 'patches', 'fix-mariadb.sh'), cwd=os.path.join(repo_dir, 'patches'))
  File "/home/sandy/bench-repo/bench/utils.py", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/sandy/bench-repo/bench/patches/fix-mariadb.sh' returned non-zero exit status 127

I corrected the above mentioned error. But still i am getting the error when i am installing frappe.

I can’t start a clean install because of my other sites is also in the same server.

Awaiting for your reply.

Did you fix by installing MariaDB-common package? The fix for the error “#error MUST be included first!” is the bench patch mariadb-config. If you got that running, what is the error now?

Are you on CentOS 7?

Ubuntu 14.04.

I installed cleanly.Everything went good. But the current problem is. It s giving 502 Bad gateway.

Got it working. The problem is supervisor is not started.

Now. Its working.

Can u tell me the minimum Server requirement for erpnext.