Bench update : Some Library issues

Hello Community,

Somehow my system gives me an error while I am executing the bench update command.

Here are the details of my error:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/commands/update.py”, line 74, in _update
update_requirements(bench_path=bench_path)
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/utils.py”, line 410, in update_requirements
install_requirements(pip, req_file)
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/utils.py”, line 446, in install_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/home/serpentcs/workspace/myprojects/erp_next/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

I have manually tried to execute this requirement.txt file of frappe.

Updating ./src/mysqlclient clone (to 1.3.12)
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File “”, line 1, in
File “/home/serpentcs/workspace/myprojects/erp_next/frappe-bench/src/mysqlclient/setup.py”, line 17, in
metadata, options = get_config()
File “setup_posix.py”, line 44, in get_config
libs = mysql_config(“libs_r”)
File “setup_posix.py”, line 26, in mysql_config
raise EnvironmentError(“%s not found” % (mysql_config.path,))
EnvironmentError: mysql_config not found

Finally, I found that some libraries which are missing in my system. One of them is libmysqlclient-dev

When I am installing this library into my system, immediately system gives me an error. The error is:

The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.58-0ubuntu0.14.04.1) but 10.1.29+maria-1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.

I think this is the main error and others are related to this error.

So I am looking for the solution to this error.

Please give me the direction to solve this error.

Thank you.

sudo apt-get install libmysqlclient-dev
will update that dependancy
After that, you should probably do
sudo apt-get update
to make sure your system is up to date on all libs etc

But not even I am able to complete the first step sudo apt-get install libmysqlclient-dev.

Error:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.58-0ubuntu0.14.04.1) but 10.1.29+maria-1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.

Try clearing the cache…
sudo apt-get clean
and then retry the other commands

I already did. Still the same issue.

Let’s just check what is “holding”…
sudo dpkg --get-selections | grep hold
once you know what the problem package is, use
sudo apt-get remove problem-package

sudo apt-mark unhold problem-package will release them as well

or try
sudo apt-get autoremove

I tried this command just before 10 seconds but I don’t get any holding package currently.

add a --purge flag
sudo apt-get remove --purge .....
or use the auto remove
sudo apt-get autoremove

What should I enter in the package name?
–purge … ?

look like the culprits to me. Maybe get a list of all your mysql packages to see what’s installed

Ok, I will try to remove all my mysql packages.

Thanks.