[Important] Error in Bench Update?

Remove redis variables from common_site_config.json

Then run
bench setup redis

@vjFaLk got an error on bench update on Centos 7 develop branch

fatal: index file smaller than expected
Command “git fetch -q” failed with error code 128 in /home/frappe/frappe-bench/env/src/pdfkit
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==4.0.0-beta’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 79, in _update
update_requirements(bench=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 372, in update_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/home/frappe/bench-repo/bench/utils.py”, line 100, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

Can you please check?

Thz

I confirm it works too. Thank you.

@anand I tried everything, but cant get rid of this error.

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==3.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/ubuntu/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/ubuntu/bench-repo/bench/commands/update.py”, line 49, in update
version_upgrade = is_version_upgrade()
File “/home/ubuntu/bench-repo/bench/app.py”, line 102, in is_version_upgrade
upstream_version = get_upstream_version(‘frappe’, bench=bench, branch=branch)
File “/home/ubuntu/bench-repo/bench/app.py”, line 156, in get_upstream_version
return get_version_from_string(contents)
File “/home/ubuntu/bench-repo/bench/app.py”, line 212, in get_version_from_string
return match.group(2)
AttributeError: ‘NoneType’ object has no attribute ‘group’

any help? My setup is in ubuntu 14.04, I have done fetch, pull in bench-repo…

@JoEz Can you try running the below commands :

rm .git/index
git reset HEAD .

1 Like

@vjFaLk ok, thx

@kirthi

Try going into bench-repo and do the below commands :

git fetch
git reset --hard origin/master

@vjFaLk got an error on bench update

Command “/home/frappe/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-kKRESo/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-fsowzS-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/frappe/frappe-bench/env/include/site/python2.7/cffi” failed with error code 1 in /tmp/pip-build-kKRESo/cffi/
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==4.0.0-beta’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 79, in _update
update_requirements(bench=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 371, in update_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/home/frappe/bench-repo/bench/utils.py”, line 99, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

Can u please check?

1 Like

@vjFaLk
I got same issue as @JoEz, and your tip couldn’t work, please see detail as below:

`mksimple@lab9:~/bench-repo$ vi .git/index
mksimple@lab9:~/bench-repo$
mksimple@lab9:~/bench-repo$
mksimple@lab9:~/bench-repo$ rm .git/index
mksimple@lab9:~/bench-repo$ git reset HEAD .
mksimple@lab9:~/bench-repo$ cd …
mksimple@lab9:~$ cd frappe-bench/
mksimple@lab9:~/frappe-bench$ bench update --upgrade
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch develop → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch develop → FETCH_HEAD
    Already up-to-date.
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Command “/var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-GabF6A/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-QxGhVU-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/service/www/nginx/marketsimple.com/frappe-bench/env/include/site/python2.7/cffi” failed with error code 1 in /tmp/pip-build-GabF6A/cffi/
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
    File “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/bench-repo/bench/commands/update.py”, line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
    File “/var/service/www/nginx/marketsimple.com/bench-repo/bench/commands/update.py”, line 79, in _update
    update_requirements(bench=bench_path)
    File “/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py”, line 371, in update_requirements
    exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
    File “/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py”, line 100, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    mksimple@lab9:~/frappe-bench$`

Hello All,

I am on master branch when i run bench update i am getting “_mysql_exceptions.OperationalError: (1048, “Column ‘image_view’ cannot be null”)” while runnng patch “erpnext.patches.v4_2.repost_reserved_qty”

Please suggest.

@vjFaLk still the same…

ubuntu@ecapsuleqa6:~/bench-repo$ git fetch
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
From GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
4a9933f…253f72f develop → origin/develop
ubuntu@ecapsuleqa6:~/bench-repo$ git reset --hard origin/master
HEAD is now at 494177d [fix] reload bench utils and bench app
ubuntu@ecapsuleqa6:~/bench-repo$ cd
ubuntu@ecapsuleqa6:~$ cd frappe-bench/
ubuntu@ecapsuleqa6:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==3.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/ubuntu/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/ubuntu/bench-repo/bench/commands/update.py”, line 49, in update
version_upgrade = is_version_upgrade()
File “/home/ubuntu/bench-repo/bench/app.py”, line 102, in is_version_upgrade
upstream_version = get_upstream_version(‘frappe’, bench=bench, branch=branch)
File “/home/ubuntu/bench-repo/bench/app.py”, line 156, in get_upstream_version
return get_version_from_string(contents)
File “/home/ubuntu/bench-repo/bench/app.py”, line 212, in get_version_from_string
return match.group(2)
AttributeError: ‘NoneType’ object has no attribute ‘group’

Facing exactly same issue as @bzero and @vjFaLk

-Amit

Try running:

./env/bin/pip install -r ./apps/frappe/requirements.txt

and see what error turns up

@gangadhar_k This is a very old patch. Check if there is any existing value in the image_view column. Ideally image_view shouldn’t have created a column. Also this is unrelated to the announcement. So please create another thread.

@anand, please see the output below,

mksimple@lab9:~/frappe-bench$ ./env/bin/pip install -r ./apps/frappe/requirements.txt Requirement already satisfied (use --upgrade to upgrade): chardet in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): cssmin in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): dropbox in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): gunicorn in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): httplib2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): jinja2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): markdown2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): markupsafe in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): mysql-python==1.2.5 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 9)) Requirement already satisfied (use --upgrade to upgrade): python-geoip in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 10)) Requirement already satisfied (use --upgrade to upgrade): python-geoip-geolite2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 11)) Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 12)) Requirement already satisfied (use --upgrade to upgrade): pytz in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 13)) Requirement already satisfied (use --upgrade to upgrade): six in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 14)) Requirement already satisfied (use --upgrade to upgrade): termcolor in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): werkzeug in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 16)) Requirement already satisfied (use --upgrade to upgrade): semantic_version in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): rauth>=0.6.2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 18)) Requirement already satisfied (use --upgrade to upgrade): requests in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 19)) Requirement already satisfied (use --upgrade to upgrade): celery in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): redis in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 21)) Requirement already satisfied (use --upgrade to upgrade): selenium in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 22)) Obtaining pdfkit from git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit (from -r ./apps/frappe/requirements.txt (line 23)) Updating ./env/src/pdfkit clone Requirement already satisfied (use --upgrade to upgrade): babel in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 24)) Requirement already satisfied (use --upgrade to upgrade): ipython in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): html2text in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 26)) Requirement already satisfied (use --upgrade to upgrade): email_reply_parser in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 27)) Requirement already satisfied (use --upgrade to upgrade): click in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 28)) Requirement already satisfied (use --upgrade to upgrade): num2words in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 29)) Requirement already satisfied (use --upgrade to upgrade): watchdog==0.8.0 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 30)) Requirement already satisfied (use --upgrade to upgrade): bleach in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 31)) Requirement already satisfied (use --upgrade to upgrade): bleach-whitelist in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 32)) Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 33)) Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 34)) Requirement already satisfied (use --upgrade to upgrade): rq in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 35)) Requirement already satisfied (use --upgrade to upgrade): schedule in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 36)) Collecting cryptography (from -r ./apps/frappe/requirements.txt (line 37)) Using cached cryptography-1.4.tar.gz Requirement already satisfied (use --upgrade to upgrade): urllib3 in ./env/lib/python2.7/site-packages (from dropbox->-r ./apps/frappe/requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): billiard<3.4,>=3.3.0.23 in ./env/lib/python2.7/site-packages (from celery->-r ./apps/frappe/requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): kombu<3.1,>=3.0.34 in ./env/lib/python2.7/site-packages (from celery->-r ./apps/frappe/requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): traitlets in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): pickleshare in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): decorator in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): pexpect; sys_platform != "win32" in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): argh>=0.24.1 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 30)) Requirement already satisfied (use --upgrade to upgrade): pathtools>=0.1.1 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 30)) Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.10 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 30)) Requirement already satisfied (use --upgrade to upgrade): html5lib>=0.999 in ./env/lib/python2.7/site-packages (from bleach->-r ./apps/frappe/requirements.txt (line 31)) Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 37)) Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 37)) Requirement already satisfied (use --upgrade to upgrade): enum34 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 37)) Requirement already satisfied (use --upgrade to upgrade): ipaddress in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 37)) Collecting cffi>=1.4.1 (from cryptography->-r ./apps/frappe/requirements.txt (line 37)) Using cached cffi-1.6.0.tar.gz Requirement already satisfied (use --upgrade to upgrade): amqp<2.0,>=1.4.9 in ./env/lib/python2.7/site-packages (from kombu<3.1,>=3.0.34->celery->-r ./apps/frappe/requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): anyjson>=0.3.3 in ./env/lib/python2.7/site-packages (from kombu<3.1,>=3.0.34->celery->-r ./apps/frappe/requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): ipython-genutils in ./env/lib/python2.7/site-packages (from traitlets->ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): pathlib2; python_version in "2.6 2.7 3.2 3.3" in ./env/lib/python2.7/site-packages (from pickleshare->ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in ./env/lib/python2.7/site-packages (from pexpect; sys_platform != "win32"->ipython->-r ./apps/frappe/requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): pycparser in ./env/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography->-r ./apps/frappe/requirements.txt (line 37)) Building wheels for collected packages: cryptography, cffi Running setup.py bdist_wheel for cryptography ... error Complete output from command /var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-M9CLlB/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpRa1OV7pip-wheel- --python-tag cp27: Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-M9CLlB/cryptography/setup.py”, line 333, in
**keywords_with_side_effects(sys.argv)
File “/usr/lib/python2.7/distutils/core.py”, line 111, in setup
_setup_distribution = dist = klass(attrs)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 269, in init
self.fetch_build_eggs(attrs[‘setup_requires’])
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 313, in fetch_build_eggs
replace_conflicting=True,
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 1071, in best_match
return self.obtain(req, installer)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 1083, in obtain
return installer(requirement)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 380, in fetch_build_egg
return cmd.easy_install(req)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 850, in install_eggs
return self.build_and_install(setup_script, setup_base)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1066, in run_setup
raise DistutilsError(“Setup script exited with %s” % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1


Failed building wheel for cryptography
Running setup.py clean for cryptography
Complete output from command /var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-M9CLlB/cryptography/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” clean --all:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-M9CLlB/cryptography/setup.py”, line 333, in
**keywords_with_side_effects(sys.argv)
File “/usr/lib/python2.7/distutils/core.py”, line 111, in setup
_setup_distribution = dist = klass(attrs)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 269, in init
self.fetch_build_eggs(attrs[‘setup_requires’])
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 313, in fetch_build_eggs
replace_conflicting=True,
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 1071, in best_match
return self.obtain(req, installer)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 1083, in obtain
return installer(requirement)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/dist.py”, line 380, in fetch_build_egg
return cmd.easy_install(req)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 850, in install_eggs
return self.build_and_install(setup_script, setup_base)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1066, in run_setup
raise DistutilsError(“Setup script exited with %s” % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1


Failed cleaning build dir for cryptography
Running setup.py bdist_wheel for cffi … error
Complete output from command /var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-M9CLlB/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” bdist_wheel -d /tmp/tmphVzbNipip-wheel- --python-tag cp27:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cffi
copying cffi/ffiplatform.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/model.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/cparser.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_gen.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/gc_weakref.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/init.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/cffi_opcode.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/commontypes.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/setuptools_ext.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/backend_ctypes.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/api.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/recompiler.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/lock.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_cpy.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/verifier.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/_cffi_include.h → build/lib.linux-x86_64-2.7/cffi
copying cffi/parse_c_type.h → build/lib.linux-x86_64-2.7/cffi
copying cffi/_embedding.h → build/lib.linux-x86_64-2.7/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1


Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cryptography cffi
Installing collected packages: pdfkit, cffi, cryptography
Running setup.py develop for pdfkit
Running setup.py install for cffi … error
Complete output from command /var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-M9CLlB/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-I2_3DA-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/service/www/nginx/marketsimple.com/frappe-bench/env/include/site/python2.7/cffi:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cffi
copying cffi/ffiplatform.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/model.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/cparser.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_gen.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/gc_weakref.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/init.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/cffi_opcode.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/commontypes.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/setuptools_ext.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/backend_ctypes.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/api.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/recompiler.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/lock.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_cpy.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/verifier.py → build/lib.linux-x86_64-2.7/cffi
copying cffi/_cffi_include.h → build/lib.linux-x86_64-2.7/cffi
copying cffi/parse_c_type.h → build/lib.linux-x86_64-2.7/cffi
copying cffi/_embedding.h → build/lib.linux-x86_64-2.7/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

----------------------------------------

Command “/var/service/www/nginx/marketsimple.com/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-M9CLlB/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-I2_3DA-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/service/www/nginx/marketsimple.com/frappe-bench/env/include/site/python2.7/cffi” failed with error code 1 in /tmp/pip-build-M9CLlB/cffi/
mksimple@lab9:~/frappe-bench$ `

Looks like libffi is not installed, can you try :

sudo apt-get install libffi-dev

and try bench update again?

I’m assuming you’re on Ubuntu

2 Likes

Thanks for your reply. It seems that ffi.h was missing. Installing it using sudo apt-get install libffi-dev corrected the issue.

-Amit

Great @vjFaLk
It’s fixed now, package missing.

Thanks a lot.

working well after 4 steps but now asking for
Please install nodejs and npm.

@vjFaLk hi, got another error running bench update:

$ bench update
INFO:bench.utils:updating bench
error: unable to resolve reference ORIG_HEAD: File o directory non esistente
fatal: Cannot lock the ref ‘ORIG_HEAD’.
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==4.0.0-beta’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/frappe/bench-repo/bench/utils.py”, line 193, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/bench-repo/bench/utils.py”, line 99, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

Can you please have a look?

Thx