Error installing Frappe-Bench in Ubuntu Mate [SOLVED]

I am trying to install frappe-bench by following easy installation process. This is the installation (and also error) log-

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time...
Installing wkhtmltopdf
Cannot install wkhtmltodpdf. Skipping...
Adding frappe user
Installing frappe-bench
Setting up first site
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/noor/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
main()
File "/home/noor/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/home/noor/frappe-bench/apps/frappe/frappe/commands.py", line 69, in new_site
_new_site(db_name, site, mariadb_root_username=mariadb_root_username, mariadb_root_password=mariadb_root_password,
admin_password=admin_password, verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File "/home/noor/frappe-bench/apps/frappe/frappe/commands.py", line 87, in _new_site
install_db(root_login=mariadb_root_username,
root_password=mariadb_root_password, db_name=db_name,
admin_password=admin_password, verbose=verbose,
source_sql=source_sql,force=force, reinstall=reinstall)
File "/home/noor/frappe-bench/apps/frappe/frappe/installer.py", line 31, in install_db
create_database_and_user(force, verbose)
File "/home/noor/frappe-bench/apps/frappe/frappe/installer.py", line 49, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File "/home/noor/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 435, in get_database_list
return [d[0] for d in self.db.sql("SHOW DATABASES")]
File "/home/noor/frappe-bench/apps/frappe/frappe/database.py", line 105, in sql
self.connect()
File "/home/noor/frappe-bench/apps/frappe/frappe/database.py", line 51, in connect
use_unicode=True, charset='utf8')
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/home/noor/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

It will be helpful for me if anyone guide me to the solution and also explain the reason of such error.

I have understood the problem and now trying to set the localhost root password to ‘YES’

@ni8mr

Looks like the install script failed to set the root password for the maria db install on Ubuntu Mate. Which version of ubuntu is your ubuntu mate based on?

@anand I am using Ubuntu Mate 1.8.2.

before installing, did you already have mariadb installed?

@anand yes. Is this the cause of the problem ?

I am trying to reset the root password of MariaDB. It is failing though. Following this link- https://www.linux.com/learn/tutorials/793758-mariadb-practical-how-to-for-linux-admins

Thank you for the help. I have solved the issue. I have removed pre-installed MariaDB, which was the cause of the error. And then also remove Frappe (by removing related folders) and reinstall it correctly.

On Ubuntu Server i get this erros:

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time...
Installing wkhtmltopdf
 * Stopping MariaDB database server mysqld                                                                                                                                                                 [ OK ] 
 * Starting MariaDB database server mysqld                                                                                                                                                            [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
Adding frappe user
Installing frappe-bench
Already using interpreter /usr/bin/python
INFO:bench.app:getting app frappe
Cloning into 'frappe'...
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.0.0', 'console_scripts', 'bench')()
  File "/home/thiago/bench-repo/bench/cli.py", line 40, in cli
bench_command()
   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
     return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
   File "/home/thiago/bench-repo/bench/commands/make.py", line 17, in init
    no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch,   verbose=verbose)
  File "/home/thiago/bench-repo/bench/utils.py", line 62, in init
    get_app('frappe', frappe_path, branch=frappe_branch, bench=path, build_asset_files=False, verbose=verbose)
  File "/home/thiago/bench-repo/bench/app.py", line 54, in get_app
    cwd=os.path.join(bench, 'apps'))
  File "/home/thiago/bench-repo/bench/utils.py", line 99, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/frappe.git --branch master  --origin upstream frappe

Linux erp 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux