Automated install - error on UbuntuServer 14.04 and Debian 7
  • Hi all

    I have set up a testserver (UbuntuServer 14.04 64bit) in Virtualbox, internet access.

    I have followed the installguide here http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/automated-install-on-debian-or-ubuntu-gnulinux/

    When I done everything from top of guide and come to type in the following command:
    sudo apt-get install booktype

    i get the following result:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package booktype

    Anyone able to help me?
    Post edited by Graabein at 2015-01-06 20:40:45
  • 15 Comments sorted by
  • Now I have tried the same installation on Debian 7, and get the same error message at the same place:

    E: Unable to locate package booktype

    Do I have to manually download the source and upload it to my root directory?
  • Hi Graabein!

    The best option would be to install Booktype 1.6 (http://sourcefabric.booktype.pro/booktype-16-for-authors-and-publishers/_draft/_v/1.0/before-you-install/) because 2.0 (from debian package) is still not finished. To answer your question Debian packages are here at the moment http://apt.sourcefabric.org/snapshots/ so you would have to add this repository to your list.

    I noticed you tried script from booktype-scrolls to install it. Will check your report on github a bit later.

    Aco
  • Thank you Aleksandar

    So I tried this:
    nano /etc/apt/sources.list
    and added this line:
    deb http://apt.sourcefabric.org/snapshots/ wheezy main
    then saved the file and tried again, got the same error

    E: Unable to locate package booktype

    I am a newbie linux guy, so I am in learning mode.  I would be happy if you could help me some more.  I have joined your transifex team for norwegian language, and would like to be able to work with a real Booktype installation process in order to get all the translating strings correct.  Words are just words until you see what context they are in.

    Also, I will try to install 1.6




    Post edited by Graabein at 2015-01-07 06:31:41
  • Oh, I forgot I had to do an update first, but it did not help, here is the result

    Hit http://apt.sourcefabric.org wheezy Release.gpg
    Ign http://apt.sourcefabric.org wheezy Release.gpg
    Hit http://apt.sourcefabric.org wheezy Release
    Ign http://apt.sourcefabric.org wheezy Release
    Hit http://apt.sourcefabric.org wheezy/main amd64 Packages
    Ign http://apt.sourcefabric.org wheezy/main Translation-en_US
    Ign http://apt.sourcefabric.org wheezy/main Translation-en
    Err http://apt.sourcefabric.org wheezy/main amd64 Packages
      404  Not Found [IP: 144.76.185.238 80]
    Ign http://apt.sourcefabric.org wheezy/main Translation-en_US
    Ign http://apt.sourcefabric.org wheezy/main Translation-en
    Fetched 274 kB in 35s (7,699 B/s)
    W: Failed to fetch http://apt.sourcefabric.org/snapshots/dists/wheezy/main/binary-amd64/Packages  404  Not Found [IP: 144.76.185.238 80]

    E: Some index files failed to download. They have been ignored, or old ones used instead.
  • I also tried this:
    nano /etc/apt/sources.list
    and added this line:
    deb http://apt.sourcefabric.org/ snapshots

    then the updater complain about some wrong syntax.
    Post edited by Graabein at 2015-01-07 07:00:14
  • Ok, this time tried installing Booktype 1.6 in Debian following this tutorial http://sourcefabric.booktype.pro/booktype-16-for-authors-and-publishers/_draft/_v/1.0/before-you-install/

    When I came to this part after installing Django:

    Then install the libraries:


    sudo pip install -r requirements/postgresql.txt
    I got the following error:
    root@debian:~# sudo pip install -r requirements/postgresql.txt
    Could not open requirements file: [Errno 2] No such file or directory: 'requirements/postgresql.txt'
    Storing complete log in /root/.pip/pip.log
    root@debian:~#

    As I am in Debian I also tried without using sudo

    root@debian:~# pip install -r requirements/postgresql.txt
    Could not open requirements file: [Errno 2] No such file or directory: 'requirements/postgresql.txt'
    Storing complete log in /root/.pip/pip.log
    root@debian:~#
    Post edited by Graabein at 2015-01-07 08:25:11
  • I am frustrated.  I think I am rather good at following instructions (install guides), but when the instructions are not complete, or maybe wrong, then I have to ask for help. Anyone here? :-)
  • With some help from Daniel in a conversation elsewhere, I managed to install Booktype 2.0 on Ubuntu Server 14.04 x64, installed in
    VirtualBox on my local network, bridged mode.


    First updated Ubuntu


    sudo apt-get update

    sudo apt-get upgrade

    .............................



    Then I followed this guide for database setup:
    http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/setting-up-the-database/



    Be aware step 4. in the above mentioned database setupguide:



    1. Confirm connections to the database booktype-db by booktype-user are
      allowed, by checking the PostgreSQL configuration file. The exact file
      name depends on the PostgreSQL version that you are using. For example,
      if the version was 9.1, the command to edit the file on Debian or Ubuntu
      GNU/Linux would be:

    sudo nano /etc/postgresql/9.1/main/pg_hba.conf

    Updated Ubuntu Server 14.04 has postgresql 9.3, so the command should be:


    sudo nano /etc/postgresql/9.3/main/pg_hba.conf

    When completed the database setupguide I went here:
    http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/automated-install-on-debian-or-ubuntu-gnulinux/



    For Ubuntu, skipped the first part and jumped directly to "Setting up the secure apt repository"



    .....................



    Setting up the secure apt repository



    To add the repository that contains Sourcefabric software, including
    Booktype, open the sources.list file in the nano editor with:


    sudo nano /etc/apt/sources.list

    Type your password, and the sources.list file will open. For Debian
    wheezy, scroll to the end of this document and add the following lines:


    # Booktype
    deb http://apt.sourcefabric.org/ trusty main

    For Ubuntu 14.04 LTS 'Trusty', substitute trusty in place of wheezy.
    Press Ctrl+O to write out the sources.list file, and Ctrl-X to quit the
    nano editor.



    You now need to update your sources. Type:


    sudo apt-get update

    You will probably see an error message about a missing public key. To
    fix this system error, you need to install the sourcefabric-keyring
    package, which contains the package signing key. This encryption key is a
    security measure which helps ensure that the Booktype packages you will
    download in future have not been tampered with by a third party.


    sudo apt-get install sourcefabric-keyring

    When prompted, press the y key on your keyboard to install the
    sourcefabric-keyring package without verification. If you wish to verify
    the authenticity of the package signing key, please contact
    Sourcefabric for assistance.



    Update your sources again, to confirm that you are now using a trusted software repository:


    sudo apt-get update

    You should no longer see the error message about the public key.



    ..................................................................



    DON'T GO ANY FURTHER IN THE INSTALL GUIDE, DO THIS INSTEAD


    sudo apt-get install gdebi-core

    Then update redis-server to latest version


    wget http://no.archive.ubuntu.com/ubuntu/pool/universe/r/redis/redis-server_2.8.4-2_amd64.deb

    ...or choose another mirror here: http://packages.ubuntu.com/trusty/amd64/redis-server/download


    sudo gdebi redis-server_2.8.4-2_amd64.deb

    Then get the Booktype 2.0 latest snapshot


    wget http://apt.sourcefabric.org/snapshots/booktype_2.0.0~20150107-1_all.deb

    ....or choose a newer one here: http://apt.sourcefabric.org/snapshots/


    sudo gdebi booktype_2.0.0~20150107-1_all.deb

    Let it install and then follow the Booktype 2.0 configuration wizard, it should start automatically.



    ...............................................



    Then I did the following to change the default document root in Apache


    sudo a2dissite 000-default.conf

    sudo a2ensite booktype-instance1.conf

    sudo service apache2 restart

    .....................................



    Then pointed my browser to the IP address of the Booktype 2.0 machine



    Log in to Booktype 2.0 and create a book (currently without chapters and sections though) (grin)

    ................................


    Still would like to get some help on installing 1.6.1 too.




  • How do I set the username and password for the Booktype 2.0 website admin?  The installscript only asked for the NAME of the administrator I want my users to contact, and the default name was "Booktype Administrator", but I was not asked to provide a username and a password?
  • Was this question ever answered? Because I ran into the same problem. I have one installation I can't log in to. I figured I skipped a step so I'm starting over on a new VirtualBox, but partway into it I noticed this message -- am I going to have the same problem again?
    Post edited by Ravenswood Cadavre at 2015-02-18 12:12:13
  • You can create superuser from the command line.

    On the Booktype 1.6 it would be (after you load needed environment set as described in the instructions):
      django-admin.py createsuperuser

    On the Booktype 2.0 it would be (from the Booktype project directory where manage.py is placed):
      ./manage.py createsuperuser

    Aco
  • I just wanted to say thank you Graabein.

    it was your instructions that allowed me to get the automated install functional on Ubuntu 14.04.

    Were you able to get PDFs printed? I am not able at all.
  • Hello robert.  Sorry for the huge delay in answering.  Reason is I just gave up.

    This was about 9 months ago.  I have now started fiddling with Booktype 2.0 again, but still have a lot of problems getting the basic install up and running.  So I am sorry, I can not help you.
    Post edited by Graabein at 2015-10-26 20:27:22
  • Hi!

    A lot of things has changed since then and we updated some things. I wrote a comment on this post - https://forum.sourcefabric.org/discussion/16930/failing-to-setup-local-instance-config-issue-not-sure-where-to-start- with some steps.

    If you want to quickly set it up using built in server you can do this. Install required system libraries and external applications as described here - http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/_draft/_v/1.0/installation-on-gnulinux/

    You can then create quickly development profile using sqlite database (not recommended for production) and host it using build in server and worker service. How to do that, you can read here - http://docs.aco.sourcefabric.net/development/profile.html

    You would just need to activate python virtual environment in two shells (source bin/activate part) and in one run ./manage.py runserver and in the other ./manage.py celeryd. This can help you to setup the server, and then you can move it to Apache and PostgreSQL.

    It is very important not to forget to install Tidy html external application and setup these configuration options:
    EXPORT_ALLOWED_HOSTS = ['127.0.0.1', '*']
    and 
    THIS_BOOKTYPE_SERVER = '127.0.0.1:8000' # this is the sample at the docs.aco.sourcefabric.net page

    Aco