Bitcoin Forum

Bitcoin => Electrum => Topic started by: rbscebu on September 07, 2019, 07:58:50 AM



Title: [SOLVED] Electrum 3.3.5 on a 32-bit Computer
Post by: rbscebu on September 07, 2019, 07:58:50 AM
After recently installing Lubuntu 18.04.3 LTS on my 32-bit computer, I have been trying to install Electrum 3.3.8 so far without success. My latest try consisted of
Code:
sudo apt-get update
sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
wget https://download.electrum.org/3.3.5/Electrum-3.3.5.tar.gz
tar xvf Electrum-3.3.5.tar.gz
All appeared to work well (no error messages or warnings). I then tried to launch Electrum using Python.
Code:
python3 ~/Electrum-3.3.5/run_electrum
Traceback (most recent call last):
  File "/home/richard/Electrum-3.3.5/run_electrum", line 355, in <module>
    fd, server = daemon.get_fd_or_server(config)
  File "/home/richard/Electrum-3.3.5/electrum/daemon.py", line 77, in get_fd_or_server
    remove_lockfile(lockfile)
  File "/home/richard/Electrum-3.3.5/electrum/daemon.py", line 58, in remove_lockfile
    os.unlink(lockfile)
PermissionError: [Errno 13] Permission denied: '/home/richard/.electrum/daemon'
I was at loss on what to do. I then got thinking about whether Electrum 3.3.8 is able to operate on a 32-bit computer, so before I go any further, is Electrum 3.3.8 designed to operate on a 32-bit computer under Lubuntu 18.04?


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: TryNinja on September 07, 2019, 08:08:01 AM
Permission denied sounds like you need to run the command with sudo.


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: Rath_ on September 07, 2019, 08:08:46 AM
Why don't you try installing it using PIP? Alternatively, you can download the AppImage (https://download.electrum.org/3.3.8/electrum-3.3.8-x86_64.AppImage).

Code:
sudo apt-get install python3-setuptools python3-pip
python3 -m pip install --user Electrum-3.3.8.tar.gz

It should work fine on a 32-bit system. By the way, you should have a 32-bit version of Python.

Edit: Before that, you can change the permissions of that folder.

Code:
sudo chmod -R 644 /home/richard/.electrum/daemon


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: igor72 on September 07, 2019, 12:58:09 PM
Alternatively, you can download the AppImage (https://download.electrum.org/3.3.8/electrum-3.3.8-x86_64.AppImage).
The AppImage is for 64-bit linux only.


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: jackg on September 07, 2019, 01:17:04 PM
Permission denied sounds like you need to run the command with sudo.

Yeah it is I had the same issue on my raspberry pi at some point.

@op run this

Code:
sudo chmod 770 /home/richard/.electrum/daemon

See what happens... I had the error 6 months ago so don't exactly know how I fixed it but I'm guessing it just can't run daemon because it'll be - rwxrw---- or something.


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: ABCbits on September 07, 2019, 06:54:17 PM
Permission denied sounds like you need to run the command with sudo.

You don't need superuser privilege to run electrum.

By the way, you should have a 32-bit version of Python.

AFAIK Python already available by default when you use Ubuntu (and most linux distro) these days

@op run this

Code:
sudo chmod 770 /home/richard/.electrum/daemon

I also suggest running this command as well. You don't need others class able to read, write or execute Electrum folder.


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: rbscebu on September 09, 2019, 01:02:09 AM
Thank you all for your guidance.

Yes, it was just an access problem. Using
Code:
sudo python3 ~/Electrum-3.3.5/run_electrum
it works.

I have also
Code:
sudo chmod 770 /home/richard/.electrum/daemon
This does not appear to change anything. I still need
Code:
sudo python3 ~/Electrum-3.3.5/run_electrum
to get Electrum to run.


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: rbscebu on September 09, 2019, 01:34:34 AM
I now want to install an app launch in my start menu. I did this by
Code:
cd ~/Electrum-3.3.5
sudo desktop-file-install electrum.desktop
This installed the app launcher in my menu://applications/Internet directory (although it was a hidden app so I had to unhide it).

For this app launcher the target file is "/home/richard/.local/share/applications/electrum.desktop" and the command is "electrum %u"

The only problem is that when I try to launch Electrum in my start menu nothing happens. Where have I gone wrong?


Title: Re: Electrum 3.3.8 on a 32-bit Computer
Post by: jackg on September 09, 2019, 09:04:44 AM
Thank you all for your guidance.

Yes, it was just an access problem. Using
Code:
sudo python3 ~/Electrum-3.3.5/run_electrum
it works.

I have also
Code:
sudo chmod 770 /home/richard/.electrum/daemon
This does not appear to change anything. I still need
Code:
sudo python3 ~/Electrum-3.3.5/run_electrum
to get Electrum to run.

What's the error now with this? It's likely the thing stopping it from opening from the start menu.

They're both using the same kernal behind so moving something from the cli to gui won't help.


Title: Re: Electrum 3.3.5 on a 32-bit Computer
Post by: Abdussamad on September 09, 2019, 02:15:45 PM
You shouldn't be running electrum as root.

i suggest you post the output of the following command:

Code:
ls -lha ~/.electrum/


Title: Re: Electrum 3.3.5 on a 32-bit Computer
Post by: rbscebu on September 10, 2019, 03:35:28 AM
I agree that I should not be running Electrum as root, however at present that is the only way that I can get it to run.
Code:
~$ ls -lha ~/.electrum/
total 3.1M
drwxr-xr-x  6 root    root    4.0K Sep  9 08:57 .
drwxr-xr-x 22 richard richard 4.0K Sep 10 10:22 ..
-rw-r--r--  1 root    root     46M Sep  9 08:27 blockchain_headers
drwx------  2 root    root    4.0K Sep  9 08:25 cache
drwxr-xr-x  2 root    root    4.0K Sep  9 08:57 certs
-rw-------  1 root    root     364 Sep  9 08:28 config
-rw-r--r--  1 root    root      42 Sep  9 08:57 daemon
drwx------  2 root    root    4.0K Sep  9 08:25 forks
-rw-r--r--  1 root    root     495 Sep  9 08:57 recent_servers
drwxr-xr-x  2 root    root    4.0K Sep  9 08:28 wallets
I tried running the electrum.desktop from terminal. First I right-clicked on Electrum in my Start Menu and picked Properties. In the File Properties I set "Execute terminal emulator", "Keep terminal window open after execution" and selected OK. Back in Start Menu I clicked on Electrum. The terminal window opened, text appeared and then the terminal window immediately closed (no time to read).

I then opened terminal and cd to ~/.local/share/applications where File Properties says my target file electrum.desktop is. I then tried the following:
Code:
~/.local/share/applications$ elecrum.desktop
elecrum.desktop: command not found
~/.local/share/applications$ electrum
W | simple_config | Cannot read config file. /home/richard/.electrum/config
Traceback (most recent call last):
  File "/home/richard/.local/bin/electrum", line 355, in <module>
    fd, server = daemon.get_fd_or_server(config)
  File "/home/richard/.local/lib/python3.6/site-packages/electrum/daemon.py", line 77, in get_fd_or_server
    remove_lockfile(lockfile)
  File "/home/richard/.local/lib/python3.6/site-packages/electrum/daemon.py", line 58, in remove_lockfile
    os.unlink(lockfile)
PermissionError: [Errno 13] Permission denied: '/home/richard/.electrum/daemon'


Title: Re: Electrum 3.3.5 on a 32-bit Computer
Post by: Abdussamad on September 10, 2019, 01:25:02 PM
Ok so the problem is that the files in that folder are owned by root and not by the richard user. That's why when you run electrum as richard it fails to access those files. Please don't apply 770 permissions to ~/.electrum. Instead do this:

Code:
sudo chown -R richard:richard /home/richard/.electrum

That should make you the owner of the files. Then you can run electrum as an unprivileged user i.e. richard and not root.



Title: Re: Electrum 3.3.5 on a 32-bit Computer
Post by: rbscebu on September 11, 2019, 06:10:06 AM
Thank you Abdussamad. Elecrtum is now working properly for me!