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

Continuing the discussion from [Guide] How to install ERPNext v14 on Linux Ubuntu (step-by-step instructions):

the python3.10-dev package is not in the 20.04 repo. Upgrade to 22.04 or find a way to install the package. I ran into this error bc I though a was on Ubuntu 22.04 but it was 20.04

The only issue that happened was during the installation of the APPs (Step6). Any help solving the problem is greatly apricated.

WARN Cannot connect to redis_cache to update assets_json
WARN Cannot connect to redis_cache to update assets_json
WARN Cannot connect to redis_cache to update assets_json

Hi @giga

Please try the below;

Login as [frappe-user] and edit the following file.

sudo nano /etc/supervisor/supervisord.conf

Add the code line below (chown) to grant permission to [frappe-user]

[unix_http_server]
file=/var/tmp/supervisord.sock
chmod=0700
chown=frappe:frappe

This should fix the issue.

1 Like

[fixed]

Firstly, I’m a newbie, this is only the second application I’ve installed on my server lol

Anyway, I believe my install was successful, however when I attempt to access it by going to [server-ip]:80 much of the javascript and css does not load properly and I am unable to log in. I can’t post the inspector log here, but basically I get several 404 errors for .js files and a few .css files.

For anyone else, I just restarted my server and reran some of step 6 and 7 and it seeeeems to work now. Still have some issues though (see below)

​

On signup, I’m getting this issue in my inspector while the page hangs on “verifying.” Might this be a port forward issue?

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1585, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/core/doctype/user/user.py”, line 859, in sign_up
user.insert()
File “apps/frappe/frappe/model/document.py”, line 281, in insert
self.run_post_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1087, in run_post_save_methods
self.run_method(“on_update”)
File “apps/frappe/frappe/model/document.py”, line 928, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1268, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1250, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 925, in fn
return method_object(*args, **kwargs)
File “apps/frappe/frappe/core/doctype/user/user.py”, line 124, in on_update
self.send_password_notification(self.__new_password)
File “apps/frappe/frappe/core/doctype/user/user.py”, line 264, in send_password_notification
self.send_welcome_mail_to_user()
File “apps/frappe/frappe/core/doctype/user/user.py”, line 335, in send_welcome_mail_to_user
self.send_login_mail(
File “apps/frappe/frappe/core/doctype/user/user.py”, line 367, in send_login_mail
frappe.sendmail(
File “apps/frappe/frappe/init.py”, line 708, in sendmail
builder.process(send_now=now)
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 656, in process
queue_data = self.as_dict(include_recipients=False)
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 697, in as_dict
mail = self.prepare_email_content()
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 625, in prepare_email_content
sender=self.sender,
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 523, in sender
return email_account.default_sender
AttributeError: ‘NoneType’ object has no attribute ‘default_sender’

Hi @echoiguess

If you’re facing a broken CSS issue on your login page then follow the instructions (step 2) in this post :point_down:

for anyone else having issues with python3.10 and this error module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

install python3.10 using the guide here Install Python 3.10

OpenSSL error lib has no attribute can be resolved by;

sudo apt update
sudo apt upgrade

pip install pip --upgrade
pip install pyopenssl --upgrade

I’m following this installation guide and realize that it is a good instructions. Thanks shashank.

But right now, i’m stuck in step 6.2. cannot moving forward.
Trying to execute this command:
bench --site site1.local install-app erpnext
but i get this following error:

this is my bench version:
bench version

Anybody can help to resolve this issue?
whole day trying and searching the solution in internet but no progress. stuck here.

Oh, i also try bench setup requirements and nothing

Hi @oscarutomo

Is this a clean server or are you trying to install erpnext on an existing server with bench installed on it? I would suggest you to try this on a clean server.

it is a clean server.
I just add a new VM on my VirtualBox

V14 is okay, but why we can’t install v13, anymore !!, i tired all the methods, including yours, but all of them fails on bench ini

What issues are you facing while trying to install v13?

You might want to check Python version. v14 best works on Python 3.10 but older versions like v13 might require older versions of Python.

Shashank, i try to reinstall in new fresh virtual box.
seems now i don’t face “module import failed” anymore. but the new issue is, i cannot run my ERP… tried to “bench start” but when I try to access localhost:8000 it keeps saying “not found”.





capture 5

Good to know that you managed to go past the module import failed issue.
Regarding bench start, you need not do this if you’re setting up the server for production use. Did you follow step no. 7 in the guide above? That will help you to setup supervisor and once it’s active, it’ll take care of all the bench processes. Manually starting bench using bench start is only required in development enviornments.

yes, i want to setup development env actually.
I want to learn how to develop erpnext

You can continue to develop on the production environment as well. It is much convenient that way since you won’t have to manually start, stop and manage all the background processes and services.

On your production environment you can just enable the developer_mode using the below command.

bench set-config developer_mode 1

nice… i can run my env now… thanks shashank

For version 13, node-sass in installation has a glaring problem. I got the following error

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

To resolve the issue, install python2. I also ensured that node 12.2.0 is used.

sudo apt-get install python2
export PYTHON=python2

and install frappe version 13

bench init --frappe-branch version-13 frappe-bench

Yes this guide is specifically for v14. Lower version of Python is required for v13.

bench user {YourSiteName}