Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues with script on 64bit Ubuntu
    primarykey
    data
    text
    <p>I have used one script, <code>https://github.com/reddit/reddit/blob/master/install-reddit.sh</code> on several machines and every time it worked perfectly. Now, one one server which has Ubuntu 64bit, I encounter issues with one part of the script.</p> <pre><code>############################################################################### # Configure PostgreSQL ############################################################################### SQL="SELECT COUNT(1) FROM pg_catalog.pg_database WHERE datname = 'reddit';" IS_DATABASE_CREATED=$(sudo -u postgres psql -t -c "$SQL") if [ $IS_DATABASE_CREATED -ne 1 ]; then cat &lt;&lt;PGSCRIPT | sudo -u postgres psql CREATE DATABASE reddit WITH ENCODING = 'utf8' TEMPLATE template0; CREATE USER reddit WITH PASSWORD 'password'; PGSCRIPT fi sudo -u postgres psql reddit &lt; $REDDIT_HOME/reddit/sql/functions.sql </code></pre> <p>This is basically breaking the whole install process. I have tried running the lines manually from the script, like <code>sudo -u postgres psql</code> but I get no output at all. It seems that the database creation is not complete, because if I follow the guide for manually setting up POSTGRESQL, the command <code>sudo -u postgres initdb -D /usr/local/pgsql/data</code> fails with this output: </p> <pre><code>sudo: initdb: command not found </code></pre> <p>I also tried adding things to the path, <code>export PATH=$PATH:/usr/lib/postgresql/bin</code> but without help too, initdb wont start. Postgresql is installed, so I don't really know what is causing this.</p> <p>Output of <code>/etc/init.d/postgresql status</code> is <code>Running clusters: 9.1/main</code> so the service is running.</p> <p>I even tried installing ia32-libs and libc6-i386 but that didn't do much difference either.</p> <p>UPDATE: After dealing with that issue, as described in the comments, I have encountered another one. I will put this here too as I think it's also closely related to this. I get the following error then:</p> <pre><code>+ sudo -u reddit make pyx [+] including definitions from Makefile.py python setup.py build_ext --inplace /home/reddit/reddit/r2/ez_setup.py:101: UserWarning: Module ez_setup was already imported from /home/reddit/reddit/r2/ez_setup.pyc, but /usr/lib/pymodules/python2.7 is being added to sys.path import pkg_resources running build_ext skipping './r2/models/_builder.c' Cython extension (up-to-date) building 'r2.models._builder' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c ./r2/models/_builder.c -o build/temp.linux-x86_64-2.7/./r2/models/_builder.o unable to execute gcc: Permission denied error: command 'gcc' failed with exit status 1 </code></pre> <p>So, this gcc thing is now causing issues. This lines are triggering this: cd $REDDIT_HOME/reddit/r2 sudo -u $REDDIT_OWNER make pyx # generate the .c files from .pyx</p> <p>$REDDIT_OWNER is reddit, so it runs as that user, and that ends up in those errors. Can anyone suggest a potential solution for this too? make: <em>*</em> [build/pyx-buildstamp] Error 1</p> <p>Thanks for your help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload