Author

Topic: Updating Electrum on Linux (Read 4865 times)

sr. member
Activity: 278
Merit: 252
ABISprotocol on Gist
May 29, 2017, 11:29:59 PM
#9
This is a super old post but I felt it was worthwhile to update the above comment a bit in case people end up using it for reference or help and also because of the UASF issue, I wanted to post this comment and provide the below guides.

OK, so here goes:

1) for those who run a full node for Electrum:

https://www.reddit.com/r/Bitcoin/comments/6duc4y/electrum_29_will_be_codenamed_independence_uasf/di60v03/

2) for those who are thinking about running a full node (Electrum), this is a super helpful guide:

https://www.reddit.com/r/Bitcoin/comments/6dvse7/uasfbip148_guide_what_you_can_do_before_august_1st/

3) If you are not running a full node in Electrum you should at least be using client that enforces BIP148, here is a post that describes how that may be helpful:

https://bitcointalksearch.org/topic/supporting-uasf-on-electrum-1865793

Hope this helps!
sr. member
Activity: 278
Merit: 252
ABISprotocol on Gist
July 20, 2015, 04:52:37 PM
#8
 Grin

OK, I think I have found the most simple possible way to approach this issue (for Linux / Ubuntu users at least):

Here is my step by step:

1) Make sure you have your seed written down and stored in a safe which it should be already anyway,
2) Make sure you have your labels backed up and your private key exported and secured.  Note anyone who gains a copy of your password / private key has access to your bitcoins, so be cautious.  In this step I decided to place a copy of my labels and private key temporarily in my documents folder.
3) Uninstall your Electrum.  In Ubuntu you can do this from the Ubuntu Software Center
4) Download and untar Electrum-2.8.3.tar.gz (this is done simply by clicking on the link at https://electrum.org/#download and navigating to "Installation from Python sources") and then unpacking Electrum-2.8.3.tar.gz to someplace prominent on your computer.
5) Open a terminal (Ctrl - Alt - T) In the electrum directory, run: 'python electrum'

You will now see some addresses running down the terminal and lo and behold, electrum is populating itself with your data from your prior version of Electrum.

If it returns back to prompt in the terminal, great, then you type this:
sudo python setup.py install
and hit enter

If it hangs and doesn't return back to prompt you may need to kill the terminal (close it) and restart a new terminal, then go back into the electrum directory, and type:
sudo python setup.py install
and hit enter

Technically you should now be done.

Then, from terminal, just type the magic word, electrum (and hit enter) and that will start the interface.

NOTE, EDIT:  IF THAT DOESN'T WORK TO START IT, TYPE (from terminal after going to electrum directory):  python electrum
and that will start the interface.

Some Unfortunate Notes:

Close electrum and see if you can find it and open it from your finder at top left or from terminal by typing electrum.  Terminal may tell you it isn't installed... if that's the case, it will then tell you to type

sudo apt-get install electrum

However, if you were to follow that, and install it, as an Ubuntu user, you will have re-installed the wallet which is version 1.9.7, which is what you uninstalled in the earlier step.  So we are probably better off NOT installing that Electrum version! It is a weak and old version which should no longer be in the Ubuntu Software Center, but sadly, still is..

Stick with the newest version of Electrum available! (Ideally 2.8.3 or newer whenever the newest version comes out.)

If (like me) you previously had problems with doing git pull to update electrum it should work fine now, at the very least, here above is a simple five-step process that works to get updated.  Make sure you update to 2.8.3 or the newest version when it comes out as Electrum will have more improvements.

finally you may also want to (in terminal) do:

    sudo apt-get autoclean
    sudo apt-get clean
    sudo apt-get autoremove

Probably overkill, but there it is.

Enjoy

P.s.. don't forget to encrypt your wallet with password!  Keep copy of your seed offline in a safe somewhere on paper and never type seed phrase online, etc.!


The above post was edited May 29, 2017.
sr. member
Activity: 278
Merit: 252
ABISprotocol on Gist
July 19, 2015, 05:26:17 AM
#7
I have no idea...

... clearly!  

What was the point then, in resurrecting a 2013 post?  FUD or legitimate inquiry?    

The choices are yours:

1.  Review the Electrum code yourself.
2.  If you are happy with it, clone the Electrum Github repo to your computer.
3.  Build the Electrum source code and execute it.
4.  If you are not able doing step 1 to 3, download the binary files compiled for you, from Electrum.org, and verify the signature
5.  If you don't trust that the binary files are the same as the source code build ... don't use Electrum... and move along...

Electrum has been around since 2012.  Nobody ever been able to claim that they have lost money because of Electrum code.  Some users may have lost their money because they didn't encrypt their wallets, or lost their password, or lost their seed words, but it would be equivalent to not encrypt your Bitcoin-core wallet, not making backups, or any other sloppy digital management practices, or disregard for warning instructions we have seen so far in this community.

Electrum, when used wisely, fits my needs.

Bitcoin is not ready for mainstream adoption yet.  If you feel uncomfortable about it - there is no shame in admitting it. Just wait a couple of years until better tools are offered to you.  

It took 15 years between the time I sent my first Email, and my mother sent her first Email. Technology needs time to spread ...  But now, at 82 years old, she is huge user of Skype, Emails, FaceTime, FaceBook, etc - connecting daily (with her iPad) with her grand-kids all over the world!  

Within the next 5 years - I guarantee you that she will do an international money transfer to one of her grand-kids, using bitcoins!  And the platform she will use will be based on the Electrum code!

Don't get me wrong, I still like Electrum.  I just think the instructions for the average human are leaving something to be desired.

And no, of course not FUD.  The whole point is to clarify or simplify instructions.
sr. member
Activity: 278
Merit: 252
ABISprotocol on Gist
July 18, 2015, 11:16:18 PM
#6
I always install from GitHub, so my updates go something like this:

1) cd ~/src/electrum
2) git pull
3) sudo python setup.py install

With setup.py at least, there's no reason to uninstall the old version, that's handled as part of the install process if an old version is already installed.

With pip, as far as I can tell that's also true, if an old version is found it should be removed automatically when the new version is installed. Or at least, I see no old versions of any Python modules on my machine when I know I've reinstalled or updated several of them through pip.

Problematically, if I go to my terminal in Ubuntu and enter these commands,

~/.electrum
(it tells me that) bash: /home/whoever/.electrum is a directory (so that's grand)
cd /home/whoever/.electrum
git pull
(and the message is returned:) fatal: Not a git repository (or any of the parent directories): .git

Of course, I'm not sure I want to update this until v.2.4 anyway... but it would be good to see some suggestions as to how to resolve this sort of issue (without having to uninstall it).

Notes, edit:  I saw you suggested doing this from github, and I would be trying to update to Linux / Ubuntu, so, for Linux at least, it might involve this based on the github page of Electrum:

pyrcc4 icons.qrc -o gui/qt/icons_rc.py
python setup.py sdist --format=zip,gztar

It gave no further details on how to utilize these commands, would they be needed for updating software or not?  Possibly not...

No reference in the github at this time to how one should update (maybe they are thinking everyone just sort of already knows the right way and it will all go off without a hitch)?

Hmm.

(I am a fan of Electrum BTW, but this issue of instructionals / how-tos on updating is something that needs improvement.)

If you are not familiar with Github, I would suggest to stick with the official releases, downloadable from Electrum.org website.  Or, start familiarizing yourself with git commands - there are great tutorials at https://guides.github.com

A "git pull" (after cloning the Github repository to your computer), will update your copy of the repo, to the latest version of the master branch.  The problem of using this update method, is that the content of the master branch may change everyday, as bugs are fixed and committed continuously.   The master branch is a work in progress and you may end up with a version that has not been extensively tested. Waiting for an official release is best if you are not planning to contribute to the code. An "official" release is a snapshot in time of the Github master branch, as determined by Electrum dev team.  

BTW:  the directory "~/.electrum" is where the data files for Electrum are stored (wallet, blockchain headers, etc).  This is not where the program is located.  In the example above your comment, he saved the source code files under ~/src/Electrum.  I save mine under ~/Github/Electrum.  Where do you save yours?

I have no idea, so I tried dpkg.  Like this:

dpkg -L electrum

so that returned a whole bunch of stuff I won't list here, but one example was
 /usr/bin/electrum
but most of it was
/usr/share/ followed by something else (e.g. electrum, or locale, or whatever, all files supposedly being electrum files)
There was also
/ur/share/applications/electrum.desktop which looked like it could have been something, but with a ton of things that the dpkg command revealed, it's hard to say which one would be more relevant.

Then I tried something else, this:

whereis electrum

(And that gave me back the following result)

electrum: /usr/bin/electrum /usr/bin/X11/electrum /usr/share/electrum /usr/share/man/man1/electrum.1.gz

So I'm assuming one of the above must be useful to me.

-----------

Cole: I want to tell you my secret now.
[Malcolm blinks very slowly]
Malcolm: Okay.
[Cole takes an eternal pause. A silent tension engulfs them both]
Cole: …I see files.
[Malcolm just gazes quietly]
Cole: I see dead files… Some of them scare me.
sr. member
Activity: 278
Merit: 252
ABISprotocol on Gist
July 18, 2015, 07:02:47 PM
#5
I always install from GitHub, so my updates go something like this:

1) cd ~/src/electrum
2) git pull
3) sudo python setup.py install

With setup.py at least, there's no reason to uninstall the old version, that's handled as part of the install process if an old version is already installed.

With pip, as far as I can tell that's also true, if an old version is found it should be removed automatically when the new version is installed. Or at least, I see no old versions of any Python modules on my machine when I know I've reinstalled or updated several of them through pip.

Problematically, if I go to my terminal in Ubuntu and enter these commands,

~/.electrum
(it tells me that) bash: /home/whoever/.electrum is a directory (so that's grand)
cd /home/whoever/.electrum
git pull
(and the message is returned:) fatal: Not a git repository (or any of the parent directories): .git

Of course, I'm not sure I want to update this until v.2.4 anyway... but it would be good to see some suggestions as to how to resolve this sort of issue (without having to uninstall it).

Notes, edit:  I saw you suggested doing this from github, and I would be trying to update to Linux / Ubuntu, so, for Linux at least, it might involve this based on the github page of Electrum:

pyrcc4 icons.qrc -o gui/qt/icons_rc.py
python setup.py sdist --format=zip,gztar

It gave no further details on how to utilize these commands, would they be needed for updating software or not?  Possibly not...

No reference in the github at this time to how one should update (maybe they are thinking everyone just sort of already knows the right way and it will all go off without a hitch)?

Hmm.

(I am a fan of Electrum BTW, but this issue of instructionals / how-tos on updating is something that needs improvement.)


legendary
Activity: 3682
Merit: 1580
August 17, 2013, 02:47:07 AM
#4
Ok I see there are lots of different ways to go about this Smiley
sr. member
Activity: 308
Merit: 250
onore dikeido
August 16, 2013, 10:46:12 PM
#3
well AUR take care of it, just running package manager. done  Cool
full member
Activity: 137
Merit: 100
August 16, 2013, 07:05:11 PM
#2
I always install from GitHub, so my updates go something like this:

1) cd ~/src/electrum
2) git pull
3) sudo python setup.py install

With setup.py at least, there's no reason to uninstall the old version, that's handled as part of the install process if an old version is already installed.

With pip, as far as I can tell that's also true, if an old version is found it should be removed automatically when the new version is installed. Or at least, I see no old versions of any Python modules on my machine when I know I've reinstalled or updated several of them through pip.
legendary
Activity: 3682
Merit: 1580
August 16, 2013, 11:24:11 AM
#1
Hello

This is how I update electrum on Linux:

1. Open Konsole/terminal app and login as root

2. Do a "pip uninstall electrum"

3. Download the latest tar ball with wget and do an md5sum to verify it.

4. Install the new electrum version with a "pip install Electrum.xxx.tar.gz"

Is this the best way to go about it? Can I omit the uninstall step and just install the new version over the old one?

BTW great program electrum. Kudos to Thomas and the other developers  Smiley
Jump to: