[Guide] How to install ERPNext v14 on Linux Ubuntu (step-by-step instructions)

And something broke. wkhtmltopdf is now again creating wrong PDFs. They are cutted and zoomed in.
Any way to solve this problem? Creating good looking PDFs is important :confused: .

Frappe Framework v14.2.0 has been released. With this install guide I am on v14.0.2.
What would be the correct way to update FF, bench or erpnext?

Thanks!

@shashank_shirke Thanks for you great instructions that have helped many.However i have not been luck to get V14 successfully installed on ubuntu 22.04.I have successfully followed the instruction to step 5.5.
When i carried out step 6.1 bench get-app payments, i got the following error:
frappe-bench$ bench get-app payments
A directory for the application ‘payments’ already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/payments to archived/apps/payments-2022-08-16
Getting payments
$ git clone GitHub - frappe/payments: A payments app for frappe --branch develop --depth 1 --origin upstream
Cloning into ‘payments’…
remote: Enumerating objects: 84, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 84 (delta 12), reused 36 (delta 4), pack-reused 0
Receiving objects: 100% (84/84), 41.21 KiB | 2.94 MiB/s, done.
Resolving deltas: 100% (12/12), done.
Ignoring dependencies of payments. To install dependencies use --resolve-deps
Installing payments
$ /home/fred/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/fred/frappe-bench/apps/payments
$ bench build --app payments
Linking /home/fred/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/fred/frappe-bench/apps/payments/payments/public to ./assets/payments :heavy_check_mark: Application Assets Linked

yarn run v1.22.19
$ node esbuild --production --apps payments --run-build-command
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module ‘./filters/deep’
Require stack:

  • /home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/provider.js
  • /home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/async.js
  • /home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/index.js
  • /home/fred/frappe-bench/apps/frappe/esbuild/esbuild.js
  • /home/fred/frappe-bench/apps/frappe/esbuild/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/provider.js:4:16)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions…js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/provider.js’,
    ‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/providers/async.js’,
    ‘/home/fred/frappe-bench/apps/frappe/node_modules/fast-glob/out/index.js’,
    ‘/home/fred/frappe-bench/apps/frappe/esbuild/esbuild.js’,
    ‘/home/fred/frappe-bench/apps/frappe/esbuild/index.js’
    ]
    }
    error Command failed with exit code 1.
    info Visit yarn run | Yarn for documentation about this command.
    Traceback (most recent call last):
    File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
    exec(code, run_globals)
    File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
    main()
    File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
    click.Group(commands=commands)(prog_name=“bench”)
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
    return self.main(*args, **kwargs)
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
    rv = self.invoke(ctx)
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
    return process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/fred/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
    return callback(*args, **kwargs)
    File “/home/fred/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 82, in build
    bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
    File “/home/fred/frappe-bench/apps/frappe/frappe/build.py”, line 257, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
    File “/home/fred/frappe-bench/apps/frappe/frappe/commands/init.py”, line 98, in popen
    raise subprocess.CalledProcessError(return
    , command)
    subprocess.CalledProcessError: Command ‘yarn run production --apps payments --run-build-command’ returned non-zero exit status 1.
    ERROR:
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 8, in
    sys.exit(cli())
    File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 127, in cli
    bench_command()
    File “/usr/lib/python3/dist-packages/click/core.py”, line 1128, in call
    return self.main(*args, **kwargs)
    File “/usr/lib/python3/dist-packages/click/core.py”, line 1053, in main
    rv = self.invoke(ctx)
    File “/usr/lib/python3/dist-packages/click/core.py”, line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/lib/python3/dist-packages/click/core.py”, line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/lib/python3/dist-packages/click/core.py”, line 754, in invoke
    return __callback(*args, **kwargs)
    File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 159, in get_app
    get_app(
    File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 432, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
    File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
    return fn(*args, **kwargs)
    File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 230, in install
    install_app(
    File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 574, in install_app
    build_assets(bench_path=bench_path, app=app)
    File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 330, in build_assets
    exec_cmd(command, cwd=bench_path, env={“BENCH_DEVELOPER”: “1”})
    File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 155, in exec_cmd
    raise CommandFailedError
    bench.exceptions.CommandFailedError

Any tip to resolve this.
Thanks

You just go to your frappe-bench directory and run bench update

Just to be cautious, make sure you take backups of all your sites (including files) before running the update.

Hi @Fred1

It looks like you already had the payments app installed on your system. I suppose this is an existing server that you’re trying to install v14 on. Can you check the list of all your installed Frappe applications by running

bench version --format table

This should give you an output of all your existing apps with their version numbers.

Any idea?

Solution
$ sudo apt install software-properties-common -y $ sudo add-apt-repository ppa:deadsnakes/ppa -y $ sudo apt install python3.10 -y

Which version of Ubuntu are use using? It looks like your system is not able to find the package in its repository. Try running the below and see if it’s able to locate it;

sudo apt-get update -y
sudo apt-get upgrade -y

Thanks for this guide! I’m a very newbie to ERPNext and came from a different ERP. Currently, i am testing ERPNext installed inside VirtualBox (via OVA). I wish to try this guide but not to use a separate computer running under Ubuntu, instead install it inside the VirtualBox. This is currently my idea on how to do this: download an ISO image of ubuntu, create a new virtual machine inside VirtualBox by copying the settings of my current ERPNext VM then follow your guide. Am i on the right path? Kindly give me some more guidance. By the way, which ubuntu should i use? desktop or server? Thanks!

Hi, new error ocurred in run “bench --site site1.local install-app hrms”

Looks like some issue with your Redis server. I think the hrms app is already installed on your server. You can try running the bench --site site1.local install-app hrms command again and you should receive a message stating that the app is already installed. You can ignore the error message and continue with the rest of the steps.

I also had the same error while installing it inside a vm. I thought it was caused by installing it inside vm in which i haven’t specified the home/guest ports in the vm’s settings. I also had warning that says “Cannot connect to redis_cache to update assets.json” which appeared in several instances but the installation went through and working. Do i have to do something with the Redis server? Thanks!

Hi
i have installed ubuntu 22.04 LTS in a oracle vm virtual box
can i use the above procedure to install erpnext
please advice
regards
Hemanth

Many users have faced this issues but no issues have been reported so far due to this issue. So, I don’t think you need to do anything as long as the system is working as expected.

Yes it should work correctly.
You might face difficulty while setting up production but it should be fixable.

Thanks for the reply!

Hi
Thanks for the reply
have a doubt
1.1 Login to the server as root user
could you please help me in to this
should i login to ubuntu root ?
please advice
hemanth

Yes that is correct.
You have to login to your Ubuntu server as the root user.

hemanth@hemanth-virtualbox:~Desktop$ su root
Password:
root@hemanth-virtualbox:/home/hemanth/Desktop#

iam also getting an error while using
su user
this is the error
su rkh error

is the above correct?
Please advice
Hemanth

Hi
all packages installed successfully with out error
how do i access erpnext
whats the command for the browser
please advice
hemanth