Hitchhikers install does not work now

One of my developer vps using 16.04.

The fail point is.

$ sudo pip install -e git+https://github.com/frappe/bench#egg=frappe-bench

Here is the last bit. of the install.

 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-stric                                    t-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format                                    -security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=545 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSIN                                    G_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/p                                    sutil/_psutil_common.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-yg2Hkx/                                    psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n                                    ');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-rUi_8o/in                                    stall-record.txt --single-version-externally-managed --compile" failed with error code 1 in /t                                    mp/pip-install-yg2Hkx/psutil/

Hope this helps to fix it

Post the full traceback

You need to install build-essential and python-dev packages

apt install python-dev build-essential

Also instead of using that step use these:

git clone https://github.com/frappe/bench
pip install -e ./bench
1 Like

I added what you said to it. and this is what I got at the end. I also added yarn install to it before I began the bench. What my question is What command do you need to fix this last bit
INFO:bench.utils:setting up backups
no crontab for frappe
INFO:bench.utils:setting up auto update
no crontab for frappe

frappe@vps180902:~$ sudo pip install -e ./bench
The directory β€˜/home/frappe/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory β€˜/home/frappe/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Obtaining file:///home/frappe/bench
Collecting Click (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 71kB 1.6MB/s
Collecting jinja2 (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 133kB 3.0MB/s
Collecting virtualenv (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/ed/ea/e20b5cbebf45d3096e8138ab74eda139595d827677f38e9dd543e6015bdf/virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.6MB 5.5MB/s
Collecting requests (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 92kB 15.9MB/s
Collecting honcho (from bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/12/c2/95faf9e062e37f50fb685972692395bef019a554c08447282a81e35bf031/honcho-1.0.1-py2.py3-none-any.whl
Collecting psutil (from bench==4.1.0)
Collecting python-crontab (from bench==4.1.0)
Collecting semantic_version (from bench==4.1.0)
Collecting GitPython==0.3.2.1 (from bench==4.1.0)
Collecting MarkupSafe>=0.23 (from jinja2->bench==4.1.0)
Collecting certifi>=2017.4.17 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 153kB 12.6MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 143kB 12.0MB/s
Collecting idna<2.7,>=2.5 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 17.5MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 133kB 10.7MB/s
Collecting python-dateutil (from python-crontab->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/0c/57/19f3a65bcf6d5be570ee8c35a5398496e10a0ddcbc95393b2d17f86aaaf8/python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 215kB 9.4MB/s
Collecting gitdb>=0.6.0 (from GitPython==0.3.2.1->bench==4.1.0)
Collecting six>=1.5 (from python-dateutil->python-crontab->bench==4.1.0)
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting smmap>=0.8.5 (from gitdb>=0.6.0->GitPython==0.3.2.1->bench==4.1.0)
Installing collected packages: Click, MarkupSafe, jinja2, virtualenv, certifi, chardet, idna, urllib3, requests, honcho, psutil, six, python-dateutil, python-crontab, semantic-version, smmap, gitdb, GitPython, bench
Running setup.py develop for bench
Successfully installed Click-6.7 GitPython-0.3.2.1 MarkupSafe-1.0 bench certifi-2018.4.16 chardet-3.0.4 gitdb-0.6.4 honcho-1.0.1 idna-2.6 jinja2-2.10 psutil-5.4.5 python-crontab-2.3.0 python-dateutil-2.7.2 requests-2.18.4 semantic-version-2.6.0 six-1.11.0 smmap-0.9.0 urllib3-1.22 virtualenv-15.2.0
frappe@vps180902:~$ bench init frappe-bench
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:./env/bin/pip -q install --upgrade pip==9.0.3
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the β€˜pip install --upgrade pip’ command.
INFO:bench.utils:./env/bin/pip -q install wheel
INFO:bench.utils:./env/bin/pip -q install six
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream
Cloning into β€˜frappe’…
remote: Counting objects: 145913, done.
remote: Total 145913 (delta 0), reused 0 (delta 0), pack-reused 145913
Receiving objects: 100% (145913/145913), 156.10 MiB | 11.74 MiB/s, done.
Resolving deltas: 100% (110161/110161), done.
Checking connectivity… done.
(β€˜installing’, u’frappe’)
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir
Updating node packages…
Please install yarn using below command and try again.
npm install -g yarn
Please install yarn using below command and try again.
npm install -g yarn

frappe@ production /home/frappe/frappe-bench/apps/frappe
FRAPPE_ENV=production node rollup/build.js

module.js:549
throw err;
^

Error: Cannot find module β€˜chalk’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:3:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frappe@ production: FRAPPE_ENV=production node rollup/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frappe@ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /home/frappe/.npm/_logs/2018-05-09T23_30_55_701Z-debug.log
INFO:bench.utils:setting up backups
no crontab for frappe
INFO:bench.utils:setting up auto update
no crontab for frappe
Bench frappe-bench initialized
frappe@vps180902:~$

You’ll have to install cron

I think something like

apt install cron

should do the trick

@blueduck & @codingCoffee

if you see the trace first install the yarn and then rerun the command it will work

install yarn On Debian or Ubuntu Linux, you can install Yarn via our Debian package repository. You will first need to configure the repository

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo β€œdeb https://dl.yarnpkg.com/debian/ stable main” | sudo tee /etc/apt/sources.list.d/yarn.list

Then you can simply run

sudo apt-get update && sudo apt-get install yarn