Sunday, September 9, 2012

FAIL Installing postgres on ubuntu - liquid feedback part 3

trying to install liquidfeedback by a novice on ubuntu by the instructions given here
http://dev.liquidfeedback.org/trac/lf/wiki/installation
http://www.public-software-group.org/liquid_feedback_core

FAILED INSTALLING

e@ubuntu:~$ su - postgres
Password:
su: Authentication failure
http://archives.postgresql.org/pgsql-novice/2004-04/msg00148.php

http://www.linuxfromscratch.org/blfs/view/svn/server/postgresql.html
http://ubuntuforums.org/showthread.php?t=662586(useless)


 sudo su postgres -c createuser daz
[sudo] password for admin:
Enter name of role to add: daz
(did not as for password why?)
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n



sudo apt-get install postgresql postgresql-client postgresql-contrib
Reading package lists... Done
Building dependency tree    
Reading state information... Done
postgresql is already the newest version.
The following extra packages will be installed:
  libossp-uuid16 postgresql-contrib-9.1
Suggested packages:
  uuid libdbd-pg-perl
The following NEW packages will be installed:
  libossp-uuid16 postgresql-client postgresql-contrib postgresql-contrib-9.1
0 upgraded, 4 newly installed, 0 to remove and 3 not upgraded.
Need to get 523 kB of archives.
After this operation, 2,279 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libossp-uuid16 amd64 1.6.2-1.1build3 [51.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main postgresql-client all 9.1+129 [5,522 B]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main postgresql-contrib-9.1 amd64 9.1.5-0ubuntu12.04 [460 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main postgresql-contrib all 9.1+129 [5,532 B]                                            
Fetched 523 kB in 18s (28.7 kB/s)                                                                                                            
Selecting previously unselected package libossp-uuid16.
(Reading database ... 152632 files and directories currently installed.)
Unpacking libossp-uuid16 (from .../libossp-uuid16_1.6.2-1.1build3_amd64.deb) ...
Selecting previously unselected package postgresql-client.
Unpacking postgresql-client (from .../postgresql-client_9.1+129_all.deb) ...
Selecting previously unselected package postgresql-contrib-9.1.
Unpacking postgresql-contrib-9.1 (from .../postgresql-contrib-9.1_9.1.5-0ubuntu12.04_amd64.deb) ...
Selecting previously unselected package postgresql-contrib.
Unpacking postgresql-contrib (from .../postgresql-contrib_9.1+129_all.deb) ...
Setting up libossp-uuid16 (1.6.2-1.1build3) ...
Setting up postgresql-client (9.1+129) ...
Setting up postgresql-contrib-9.1 (9.1.5-0ubuntu12.04) ...
Setting up postgresql-contrib (9.1+129) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
http://www.redhat.com/support/resources/faqs/RH-apache-FAQ/postgres/postgres-install.html

http://www.sakana.fr/blog/2007/06/06/postgresql-create-a-user-a-database-and-grant-accesses/
pgAdmin is a free software
pgAdmin has a huge array of features
pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL
http://www.pgadmin.org/index.php
This installs the database server/client, some extra utility scripts and the pgAdmin GUI application for working with the database.
http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804/

sudo apt-get install pgadmin3
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following extra packages will be installed:
  pgadmin3-data pgagent
The following NEW packages will be installed:
  pgadmin3 pgadmin3-data pgagent
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 6,427 kB of archives.
After this operation, 16.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe pgadmin3-data all 1.14.0-2 [3,959 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/universe pgadmin3 amd64 1.14.0-2 [2,429 kB]                                              
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/universe pgagent amd64 3.0.1-1 [39.5 kB]                                                  
Fetched 6,427 kB in 2min 0s (53.4 kB/s)                                                                                                      
Selecting previously unselected package pgadmin3-data.
(Reading database ... 152814 files and directories currently installed.)
Unpacking pgadmin3-data (from .../pgadmin3-data_1.14.0-2_all.deb) ...
Selecting previously unselected package pgadmin3.
Unpacking pgadmin3 (from .../pgadmin3_1.14.0-2_amd64.deb) ...
Selecting previously unselected package pgagent.
Unpacking pgagent (from .../pgagent_3.0.1-1_amd64.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for menu ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Setting up pgadmin3-data (1.14.0-2) ...
Setting up pgadmin3 (1.14.0-2) ...
Setting up pgagent (3.0.1-1) ...
Processing triggers for menu ...

http://www.sakana.fr/blog/2007/06/06/postgresql-create-a-user-a-database-and-grant-accesses/
postgres@hostname:~$ c  <<


A password will be missing. As root issue the command: passwd postgres to assign a password for user postgres.
http://www.yolinux.com/TUTORIALS/LinuxTutorialPostgreSQL.html


sudo passwd postgres
Enter new UNIX password:
Retype new UNIX password:
Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged


 sudo passwd postgres
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

 su - postgres
Password: 
postgres@ubuntu:~$ 


postgres@ubuntu:~$ createuser
Enter name of role to add: www-data
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n


 postgres@ubuntu:~$ exit
logout


@ubuntu:~$ cd /root
bash: cd: /root: Permission denied


sudo sh cd /root
sh: 0: Can't open cd
http://jagadhguru-tech.blogspot.in/2010/09/bash-cd-root-permission-denied.html
http://www.dba-oracle.com/linux/chmod_permission.htm


@ubuntu:~$ sudo sh
# cd /root
# mkdir install
# cd /root/install
# wget http://www.public-software-group.org/pub/projects/liquid_feedback/backend/v2.0.11/liquid_feedback_core-v2.0.11.tar.gz
--2012-09-09 18:08:06--  http://www.public-software-group.org/pub/projects/liquid_feedback/backend/v2.0.11/liquid_feedback_core-v2.0.11.tar.gz
Resolving www.public-software-group.org (www.public-software-group.org)... 62.75.240.185
Connecting to www.public-software-group.org (www.public-software-group.org)|62.75.240.185|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 99588 (97K) [application/octet-stream]
Saving to: `liquid_feedback_core-v2.0.11.tar.gz'


100%[======================================================================================================>] 99,588      42.5K/s   in 2.3s  

2012-09-09 18:08:09 (42.5 KB/s) - `liquid_feedback_core-v2.0.11.tar.gz' saved [99588/99588]

# tar -xvzf liquid_feedback_core-v2.0.11.tar.gz
liquid_feedback_core-v2.0.11/LICENSE
liquid_feedback_core-v2.0.11/Makefile
liquid_feedback_core-v2.0.11/README
liquid_feedback_core-v2.0.11/core.sql
liquid_feedback_core-v2.0.11/demo.sql
liquid_feedback_core-v2.0.11/init.sql
liquid_feedback_core-v2.0.11/lf_export
liquid_feedback_core-v2.0.11/lf_update.c
liquid_feedback_core-v2.0.11/test.sql
liquid_feedback_core-v2.0.11/update/core-update.beta26-v1.0.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.0.0-v1.0.1.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.0.1-v1.0.2.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.0.2-v1.0.3.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.0.3-v1.1.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.1.0-v1.2.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.0-v1.2.1.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.1-v1.2.2.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.2-v1.2.3.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.3-v1.2.4.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.4-v1.2.5.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.5-v1.2.6.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.6-v1.2.7.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.7-v1.2.8.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.8-v1.2.9.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.2.9-v1.3.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.3.0-v1.3.1.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.3.1-v1.4.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.3.1-v1.4.0_rc1.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.4.0-v2.0.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.4.0_rc1-v1.4.0_rc2.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.4.0_rc2-v1.4.0_rc3.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.4.0_rc3-v1.4.0_rc4.sql
liquid_feedback_core-v2.0.11/update/core-update.v1.4.0_rc4-v1.4.0.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.0-v2.0.1.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.1-v2.0.2.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.10-v2.0.11.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.2-v2.0.3.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.3-v2.0.4.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.4-v2.0.5.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.5-v2.0.6.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.6-v2.0.7.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.7-v2.0.8.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.8-v2.0.9.sql
liquid_feedback_core-v2.0.11/update/core-update.v2.0.9-v2.0.10.sql

# make
cc -Wall -g -lpq \
-I "`pg_config --includedir`" \
-L "`pg_config --libdir`" \
-o lf_update lf_update.c
lf_update.c: In function ‘main’:
lf_update.c:19:11: warning: variable ‘out’ set but not used [-Wunused-but-set-variable]
/tmp/ccGlcMWS.o: In function `main':
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:47: undefined reference to `PQconnectdb'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:52: undefined reference to `PQstatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:53: undefined reference to `PQerrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:58: undefined reference to `PQexec'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:63: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:64: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:66: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:68: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:70: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:74: undefined reference to `PQexec'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:79: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:80: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:82: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:84: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:86: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:90: undefined reference to `PQexec'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:95: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:96: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:98: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:100: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:102: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:106: undefined reference to `PQexec'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:110: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:111: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:113: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:115: undefined reference to `PQntuples'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:118: undefined reference to `PQgetvalue'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:119: undefined reference to `PQexecParams'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:126: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:127: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:129: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:131: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:133: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:136: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:141: undefined reference to `PQexec'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:145: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:146: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:148: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:150: undefined reference to `PQntuples'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:153: undefined reference to `PQgetvalue'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:154: undefined reference to `PQexecParams'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:161: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:162: undefined reference to `PQresultStatus'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:164: undefined reference to `PQresultErrorMessage'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:166: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:168: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:171: undefined reference to `PQclear'
/root/install/liquid_feedback_core-v2.0.11/lf_update.c:175: undefined reference to `PQfinish'
collect2: ld returned 1 exit status
make: *** [lf_update] Error 1




$lsb_release -sc
precise

The lsb_release command prints certain LSB (Linux Standard Base) and Distribution information.
http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html


https://wiki.ubuntu.com/IRC/ChannelList
https://help.ubuntu.com/community/InternetRelayChat/Registration

trying to get help with this make error
no help on google
liquidfeedback icr was empty

there was one nice guy on freenode ubuntu but too many people asking him for help

http://wiki.piratenpartei.de/IRC
freenode.net /join #Piratenpartei

 [#piratenpartei] Durch eine Teilnahme an diesem Chat erklärst du dich mit den Grundregeln auf http://wiki.piratenpartei.de/IRC (Punkt 2) einverstanden. Bitte beachte dort auch die Hinweise zum Opcall !ARGH für Notfälle und zum AG-Kanal #piraten-ag-chat || Die Aussagen im Chat stellen private Meinungen dar und keine Aussagen der Partei

there are 200 nicks on that irc channel but all are idle .


# ls
core.sql  demo.sql  init.sql  lf_export  lf_update.c  LICENSE  Makefile  README  test.sql  update
# make clean
rm -f lf_update


# cd /root
# ls
install
# cd install
# cd liquid_feedback_core-v2.0.11
# ls
core.sql  demo.sql  init.sql  lf_export  lf_update.c  LICENSE  Makefile  README  test.sql  update





Setup the database:
$ createdb liquid_feedback
$ psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback

Optionally insert demo data:
$ psql -v ON_ERROR_STOP=1 -f demo.sql liquid_feedback

Compile lf_update binary:
$ make

Ensure that "lf_update dbname=liquid_feedback" is called regularly!

It is required that lf_update is executed regulary (i.e. every
5 minutes via cron) to update cached supporter counts, to change
the state of issues when neccessary, and to calculate the result
of votings. If you wish, copy the created lf_update file to
/usr/local/bin or a similar directory.

On successful run, lf_update will not produce any output
and exit with code 0.

NOTE: When writing to the database, some INSERTs must be executed
      within the same transaction, e.g. issues can't exist without
      an initiative and vice versa.

To create an export file, which is containing all but private data,
you may use the lf_export shell-script:
$ lf_export liquid_feedback export.sql.gz

To uninstall the software, delete the lf_update binary
and drop the database by entering the following command:
$ dropdb liquid_feedback

Updating is done using the update scripts in the update/ directory.
After updating it is recommended to recreate the schema as follows
(assuming the database superuser is named "postgres"):
$ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
$ dropdb DATABASE_NAME
$ createdb DATABASE_NAME
$ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
$ su postgres  # (execute following command as database superuser)
$ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
$ exit         # leave "su" command
$ rm tmp.sql


cd /opt
@ubuntu:/opt$ ls
@ubuntu:/opt$ hg clone http://www.public-software-group.org/mercurial/liquid_feedback_core
The program 'hg' is currently not installed.  You can install it by typing:
sudo apt-get install mercurial



 sudo apt-get install mercurial
[sudo] password foradmin:
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following extra packages will be installed:
  mercurial-common
Suggested packages:
  qct wish vim emacs kdiff3 tkdiff meld xxdiff python-mysqldb python-pygments
The following NEW packages will be installed:
  mercurial mercurial-common
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,983 kB of archives.
After this operation, 6,701 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe mercurial-common all 2.0.2-1ubuntu1 [1,945 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/universe mercurial amd64 2.0.2-1ubuntu1 [38.0 kB]                                        
Fetched 1,983 kB in 46s (42.8 kB/s)                                                                                                          
Selecting previously unselected package mercurial-common.
(Reading database ... 153386 files and directories currently installed.)
Unpacking mercurial-common (from .../mercurial-common_2.0.2-1ubuntu1_all.deb) ...
Selecting previously unselected package mercurial.
Unpacking mercurial (from .../mercurial_2.0.2-1ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up mercurial-common (2.0.2-1ubuntu1) ...
Setting up mercurial (2.0.2-1ubuntu1) ...

Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version

2 comments:

  1. About liquid_feedback_core/lf_update compilation:

    For me worked changing the Makefile (moving the -L -lpq to the end)

    ----------------

    lf_update: lf_update.c
    cc -Wall -g -lpq \
    -I/usr/include/postgresql \
    -o lf_update lf_update.c \
    -L/usr/lib -lpq

    clean::
    rm -f lf_update

    ReplyDelete
  2. Searching for the Best Dating Site? Create an account to find your perfect match.

    ReplyDelete