Install Fail ERPNext With Ubuntu 18.04

camilo@DESKTOP-KOJCFNE:~$ sudo python3 -m pip install --upgrade pip
[sudo] password for camilo:
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
WARNING: The directory ‘/home/camilo/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag.
Requirement already satisfied: pip in /usr/local/lib/python3.6/dist-packages (21.3.1)
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead:
camilo@DESKTOP-KOJCFNE:~$ python3 install.py --production
python3: can’t open file ‘install.py’: [Errno 2] No such file or directory
camilo@DESKTOP-KOJCFNE:~$ cd mnt/c
-bash: cd: mnt/c: No such file or directory
camilo@DESKTOP-KOJCFNE:~$ cd …
camilo@DESKTOP-KOJCFNE:/home$ cd …
camilo@DESKTOP-KOJCFNE:/$ cd …
camilo@DESKTOP-KOJCFNE:/$
camilo@DESKTOP-KOJCFNE:/$ cd mnt/c
camilo@DESKTOP-KOJCFNE:/mnt/c$ cd Users/SHAMILO/Downloads/
camilo@DESKTOP-KOJCFNE:/mnt/c/Users/SHAMILO/Downloads$ sudo ssh -i AkoERPNext.pem ubuntu"arroba"3.87.160.216
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-1060-aws x86_64)

  • Documentation:
  • Management:
  • Support:

System information as of Thu Dec 9 18:59:14 UTC 2021

System load: 0.0 Processes: 107
Usage of /: 67.0% of 7.69GB Users logged in: 0
Memory usage: 31% IP address for eth0: 172.31.92.5
Swap usage: 0%

  • Ubuntu Pro delivers the most comprehensive open source security and
    compliance features.

0 updates can be applied immediately.

New release ‘20.04.3 LTS’ available.
Run ‘do-release-upgrade’ to upgrade to it.

Last login: Thu Dec 9 16:47:37 2021 from 181.225.78.13
ubuntu@ip-172-31-92-5:~$ $ apt install python3-minimal build-essential python3-setuptools
$: command not found
ubuntu@ip-172-31-92-5:~$ apt install python3-minimal build-essential python3-setuptools
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
ubuntu@ip-172-31-92-5:~$ sudo $ apt install python3-minimal build-essential python3-setuptools
sudo: $: command not found
ubuntu@ip-172-31-92-5:~$ sudo apt install python3-minimal build-essential python3-setuptools
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version (12.4ubuntu1).
python3-setuptools is already the newest version (39.0.1-2).
python3-minimal is already the newest version (3.6.7-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ubuntu@ip-172-31-92-5:~$ sudo wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
–2021-12-09 19:00:07–
Resolving 185.199.111.133, 185.199.108.133, 185.199.109.133, …
Connecting to raw.githubusercontent.com |185.199.111.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 18232 (18K) [text/plain]
Saving to: ‘install.py.3’

install.py.3 100%[===============================>] 17.80K --.-KB/s in 0s

2021-12-09 19:00:08 (84.9 MB/s) - ‘install.py.3’ saved [18232/18232]

ubuntu@ip-172-31-92-5:~$ sudo python3 install.py --production
Logs are saved under /tmp/logs/easy-install__2021-12-09__19-00.log
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
pip3 already installed!
Checking System Compatibility…
ubuntu 18 is compatible!
Cloning bench repository branch develop into /tmp/.bench
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match ‘all’
Input MySQL and Frappe Administrator passwords:
Passwords saved at ~/passwords.txt
Initializing bench frappe-bench:
Frappe Branch: version-12
ERPNext Branch: version-12
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match ‘all’
[WARNING]: Consider using the get_url or uri module rather than running ‘curl’. If you need to
use command because get_url or uri is insufficient you can add ‘warn: false’ to this command
task or set ‘command_warnings=False’ in ansible.cfg to get rid of this message.
[DEPRECATION WARNING]: evaluating [] as a bare variable, this behaviour will go away and you
might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS
configuration toggle… This feature will be removed in version 2.12. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Consider using the file module with owner rather than running ‘chown’. If you need
to use command because file is insufficient you can add ‘warn: false’ to this command task or
set ‘command_warnings=False’ in ansible.cfg to get rid of this message.
Traceback (most recent call last):
File “install.py”, line 500, in
install_bench(args)
File “install.py”, line 281, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 416, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returne
d non-zero exit status 2.

Hi
It seems you are wanting to install ERPNext-V12 on Ubuntu 18.04?

If you are interested, I am using a “manual method” on a VPS at Digital Ocean. I have used the
same method to install about 10 V12 servers and the method works well.

Pleae Note: It is a LONG manual method. You type in the commands one by one so if you are
very carefull like I do and check the commands carefully it can easily take you 2 hours to do
the install.

I am not putting the link just as yet because I have to include my notes of one update that I made. Where an updated version of PIP must be installed.

If you want to try it I can give you th elink together with my notes of the correction.

Although it is a long method, I do like th fact that you can check command-for-command
if things go wrong or not.

I would like to try it.

OK

The actual procedure is on this link …

This is to install V12. It does not work for V13 by simply changing the “12” to a “13”

You will see its pretty comprehensive and even explains at certain points what has happened.
It also gives you guide-lines about the pre-install i.e. creating a user, setting up a firewall etc.

With my first server install I did not pickup the version-problem listed below. SO I assume that
it is a natural result of software moving on in their revision numbers .

I will simply copy and paste my own notes below but I am going to attempt toexplain.
If my explanation is unclear, just yell.

So here goes …
At the begining of step (5) you do the command …

(A)
sudo DEBIAN_FRONTEND=noninteractive apt install … ( edited out rest of command )
This will pass

Then according to the notes, you have to do …

(B)
sudo DEBIAN_FRONTEND=noninteractive apt install

But this (should) fail … incorrect version of PIP. You can read the error message. It even tells
you what to do.

So after you executed (A) and before you do (B), you do …

sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py

Then you just keep on following the instructions and you should be good to go

Have ready before you begin :

a user-name that you can use as ERPNExt-user
password for ERPNExt-user
password for root

I don’t know where you are going to deploy this. If it is on a VPS, I strongly suggest
using an SSH-key. Very soon after creating a VPS on any cloud-based system , you see the
bot-attacks.

Hardware : I am running on a Digital Ocean droplet : 2VCPU + 4G-RAM

DO NOT think you are going to do this before breakfast quickly. Maybe you are a lot
quicker than I am , but I always set aside plenty of time which allows me to observe the
outputs of each command so that I can see that nothing went wrong.

Good luck

Below is a paste of my own notes. Hope it makes sense based on my typing above …


For error at beginning of step 5

do this command:
sudo DEBIAN_FRONTEND=noninteractive apt install -y curl build-essential mariadb-client python3-setuptools python3-dev libffi-dev python3-pip libcurl4 dnsmasq fontconfig git htop libcrypto+±dev libfreetype6-dev liblcms2-dev libwebp-dev libxext6 libxrender1 libxslt1-dev libxslt1.1 libffi-dev ntpdate postfix python3-dev python-tk screen vim xfonts-75dpi xfonts-base zlib1g-dev apt-transport-https libsasl2-dev libldap2-dev libcups2-dev pv libjpeg8-dev libtiff5-dev tcl8.6-dev tk8.6-dev libssl1.0-dev python3-mysqldb libdate-manip-perl logwatch

then do these commands
sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py

then do the next command … and continue as normal
sudo -H python3 -m pip install --upgrade setuptools cryptography psutil


End of my own notes

Check this log file and post its output.
Or, run sudo python3 install.py --production --verbose and post the output.

Hi Camilo,

I think you may be almost there. Try running these commands:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

And go back to your frappe-bench folder and run the install script again and it might just go through.

Hope this helps.

Thanks

Jay