Fresh install on Debian 9

Dear everyone,

Would it be possible to install existing Frappe and ErpNext on fresh Debian 9?
Is there anyone success?

Thank you.

I’ve successfully installed on Debian 9.
Manual Install not Easy Install.

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

sudo apt-get install -y curl wget git build-essential python-setuptools python-dev libffi-dev libssl-dev python2.7 redis-server software-properties-common libxrender1 libxext6 xfonts-75dpi xfonts-base zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev python-tk apt-transport-https libsasl2-dev libldap2-dev libjpeg62-turbo-dev libtiff5-dev tcl8.5-dev tk8.5-dev nodejs mariadb-server mariadb-client mariadb-common libmariadbclient-dev nginx supervisor

sudo pip install --upgrade setuptools pip

Install wkhtmltopdf

cd /tmp
wget -c https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
sudo cp /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
sudo chmod o+x /usr/local/bin/wkhtmltopdf

set mariadb root password

sudo mysql -u root
...
MariaDB [(none)]> use mysql;
MariaDB [mysql]> update user set plugin='' where User='root';
MariaDB [mysql]> update user set password=PASSWORD("password") where User='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit

add the /etc/mysql/mariadb.conf.d/frappe.cnf https://github.com/frappe/bench/wiki/MariaDB-conf-for-Frappe and restart mariadb

Install bench

NOTE : use latest node (post was written with node 6.x setup)

4 Likes

Hello…

I’m trying to install on Debian 9 using this method. Everything goes fine until when I start installing Bench.

When I run: bench init frappe-bench && cd frappe-bench

It gave me this error:

uws@0.14.5 install /home/user/frappe-bench/node_modules/uws
node-gyp rebuild > build_log.txt 2>&1 || exit 0

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/user/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/user/bench-repo/bench/commands/make.py”, line 21, in init
verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
File “/home/user/bench-repo/bench/utils.py”, line 72, in init
update_npm_packages(bench_path=path)
File “/home/user/bench-repo/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/user/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

Anybody knows how to solve it?

I recall once there was similar error in case you have an old npm. What is the version of npm you have?

Hello,

npm --version
3.10.10

nodejs --version
v6.11.3

Is this consider “too old” ?

These both are LTS versions, so should be enough. You can have a try upgrading nodejs to 8.6.0 though.

It worked. I just need to remove nodejs 6.x and replace it with 8.x

sudo apt-get purge nodejs
sudo rm -r /etc/apt/sources.list.d/nodesource.list
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt-get install -y nodejs

Thank you very much

2 Likes

Everything went fine till ‘bench init frappe-bench’ which says 'bench command not found. Similar to the issue reported here: https://stackoverflow.com/questions/48005872/install-frappe-framework-bench-command-not-found

The proper documentation seems lacking manual, easy install and frappe_docker. I tried all as stated below.

For reference, I have listed all my ordeals at https://github.com/frappe/frappe_docker/issues/27, https://github.com/frappe/frappe_docker/issues/25 and https://github.com/frappe/frappe_docker/issues/28

Sorted out the ‘bench command not found’ issue. The bench binary was installed at an unusual place at ~/.local/bin diretory.

So, I needed to export the related path.

'$ export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"

Or add to .profile