mailchuck / PyBitmessage

This repository has been discontinued, please use the official PyBitmessage repository

Home Page:https://github.com/Bitmessage/PyBitmessage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

// , Build fails in Ubuntu

v6 opened this issue · comments

// , Build fails on Ubuntu 14.04, with the following output:

nathan-xps% cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
NAME="Ubuntu"
VERSION="14.04.4 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.4 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
nathan-xps% uname -a
Linux nathan-xps 3.16.0-70-generic #90~14.04.1-Ubuntu SMP Wed Apr 6 22:56:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
cd proj
nathan-xps% mkdir pybitmessage
nathan-xps% cd pybitmessage 
nathan-xps% git clone https://github.com/Bitmessage/PyBitmessage $HOME/PyBitmessage
fatal: destination path '/home/nb/PyBitmessage' already exists and is not an empty directory.
nathan-xps% ls                                                                     
nathan-xps% git clone https://github.com/Bitmessage/PyBitmessage                   
Cloning into 'PyBitmessage'...
remote: Counting objects: 6366, done.
remote: Total 6366 (delta 0), reused 0 (delta 0), pack-reused 6366
Receiving objects: 100% (6366/6366), 3.70 MiB | 1.42 MiB/s, done.
Resolving deltas: 100% (4184/4184), done.
Checking connectivity... done.
nathan-xps% ./PyBitmessage/src/bitmessagemain.py 
Loading existing config files from /home/nb/.config/PyBitmessage/
2016-04-25 15:29:07,294 - DEBUG - Database file already exists.
Could not read the Namecoin config file probably because you don't have Namecoin installed. That's ok; we don't really need it. Detailed error message: [Errno 2] No such file or directory: '/home/nb/.namecoin/namecoin.conf'
2016-04-25 15:29:07,333 - INFO - It has been a long time since the messages.dat file has been vacuumed. Vacuuming now...
2016-04-25 15:29:07,358 - DEBUG - Loaded 0 objects from disk into the objectProcessorQueue.
2016-04-25 15:29:07,359 - DEBUG - reloading keys from keys.dat file
2016-04-25 15:29:07,380 - DEBUG - reloading subscriptions...
Info: we could not tell whether your OS is limited to having very view half open connections because we couldn't interpret the platform version. Don't worry; we'll assume that it is not limited. This tends to occur on Raspberry Pis. : invalid version number '#90~14.04.1-Ubuntu SMP Wed Apr 6 22:56:34 UTC 2016'
PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download   or by searching Google for 'PyQt Download'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon
You can also run PyBitmessage with the new curses interface by providing '-c' as a commandline argument.
^C^C^C^C^C^Cc

I'm not sure how I can investigate the above error messages further, but I'm bound to try.

You need to install PyQt4 if you want to use the GUI. It actually tells you that in the last line. On Ubuntu 14.04, you do, as root:

apt-get install python-qt4

Also, you're checking out the official Bitmessage repo rather than this fork.

// , Even with these libraries installed, and using the correct fork, this does not work properly.

% cd proj
% cd pybitmessage 
% ls
PyBitmessage
% rm -rf PyBitmessage 
% git clone git://github.com/mailchuck/PyBitmessage.git
Cloning into 'PyBitmessage'...
remote: Counting objects: 8468, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 8468 (delta 27), reused 0 (delta 0), pack-reused 8420
Receiving objects: 100% (8468/8468), 5.64 MiB | 1.37 MiB/s, done.
Resolving deltas: 100% (5831/5831), done.
Checking connectivity... done.
% sudo apt-get install python openssl git python-qt4   
[sudo] password for nb: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python is already the newest version.
python-qt4 is already the newest version.
git is already the newest version.
openssl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
% python --version
Python 2.7.10
nathan-xps% cd PyBitmessage/ && python src/bitmessagemain.py
Loading existing config files from /home/nb/.config/PyBitmessage/
Failed to load debug config from /home/nb/.config/PyBitmessage/logging.dat, using default logging config
(<class 'ConfigParser.NoSectionError'>, No section: 'formatters', <traceback object at 0x7f8508a6da28>)
2016-04-25 16:33:49,331 - CRITICAL - PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for 'PyQt Download' (without quotes).
Traceback (most recent call last):
  File "/home/nb/proj/pybitmessage/PyBitmessage/src/bitmessageqt/__init__.py", line 11, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: No module named PyQt4
2016-04-25 16:33:49,332 - CRITICAL -   File "src/bitmessagemain.py", line 265, in <module>
    mainprogram.start(shared.safeConfigGetBoolean('bitmessagesettings', 'daemon'))
  File "src/bitmessagemain.py", line 157, in start
    shared.thisapp = singleton.singleinstance("", daemon)
  File "/home/nb/proj/pybitmessage/PyBitmessage/src/singleton.py", line 29, in __init__
    import bitmessageqt
  File "/home/nb/proj/pybitmessage/PyBitmessage/src/bitmessageqt/__init__.py", line 19, in <module>
    sys.exit()

2016-04-25 16:33:49,333 - CRITICAL - <type 'exceptions.NameError'>: name 'sys' is not defined

I had already had PyQt4 installed.

As for using the mailchuck repository, I have updated the installation instructions in #198 for absent-minded people like me.

You may have two different python versions installed. Ubuntu 14.04 comes with python 2.7.6 rather than 2.7.10. Try specifying the full path, /usr/bin/python or /usr/bin/python2 or /usr/bin/python2.7