Problems with OJS Vagrant install

Hi,

I was testing the OJS Vagrant you have available here: GitHub - pkp/vagrant: Vagrant environments for PKP software

However, I could not get it working. The install process ends with this:

[5,936 B]
==> default: Get:13 http://security.ubuntu.com trusty-security/universe Translat
ion-en [76.7 kB]
==> default: Get:14 http://archive.ubuntu.com trusty-updates/main amd64 Packages
[788 kB]
==> default: Get:15 http://archive.ubuntu.com trusty-updates/restricted amd64 Pa
ckages [15.9 kB]
==> default: Get:16 http://archive.ubuntu.com trusty-updates/universe amd64 Pack
ages [362 kB]
==> default: Get:17 http://archive.ubuntu.com trusty-updates/multiverse amd64 Pa
ckages [13.2 kB]
==> default: Get:18 http://archive.ubuntu.com trusty-updates/main Translation-en
[396 kB]
==> default: Get:19 http://archive.ubuntu.com trusty-updates/multiverse Translat
ion-en [7,227 B]
==> default: Get:20 http://archive.ubuntu.com trusty-updates/restricted Translat
ion-en [3,699 B]
==> default: Get:21 http://archive.ubuntu.com trusty-updates/universe Translatio
n-en [190 kB]
==> default: Get:22 http://archive.ubuntu.com trusty-backports/main Sources [9,5
65 B]
==> default: Get:23 http://archive.ubuntu.com trusty-backports/restricted Source
s [28 B]
==> default: Get:24 http://archive.ubuntu.com trusty-backports/universe Sources
[35.2 kB]
==> default: Get:25 http://archive.ubuntu.com trusty-backports/multiverse Source
s [1,898 B]
==> default: Get:26 http://archive.ubuntu.com trusty-backports/main amd64 Packag
es [13.3 kB]
==> default: Get:27 http://archive.ubuntu.com trusty-backports/restricted amd64
Packages [28 B]
==> default: Get:28 http://archive.ubuntu.com trusty-backports/universe amd64 Pa
ckages [43.1 kB]
==> default: Get:29 http://archive.ubuntu.com trusty-backports/multiverse amd64
Packages [1,571 B]
==> default: Get:30 http://archive.ubuntu.com trusty-backports/main Translation-
en [7,505 B]
==> default: Get:31 http://archive.ubuntu.com trusty-backports/multiverse Transl
ation-en [1,215 B]
==> default: Get:32 http://archive.ubuntu.com trusty-backports/restricted Transl
ation-en [28 B]
==> default: Get:33 http://archive.ubuntu.com trusty-backports/universe Translat
ion-en [36.8 kB]
==> default: Hit http://archive.ubuntu.com trusty Release
==> default: Get:34 http://archive.ubuntu.com trusty/main Sources [1,064 kB]
==> default: Get:35 http://archive.ubuntu.com trusty/restricted Sources [5,433 B
]
==> default: Get:36 http://archive.ubuntu.com trusty/universe Sources [6,399 kB]
==> default: Get:37 http://archive.ubuntu.com trusty/multiverse Sources [174 kB]
==> default: Hit http://archive.ubuntu.com trusty/main amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/universe amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/main Translation-en
==> default: Hit http://archive.ubuntu.com trusty/multiverse Translation-en
==> default: Hit http://archive.ubuntu.com trusty/restricted Translation-en
==> default: Hit http://archive.ubuntu.com trusty/universe Translation-en
==> default: Ign http://archive.ubuntu.com trusty/main Translation-en_US
==> default: Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
==> default: Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
==> default: Ign http://archive.ubuntu.com trusty/universe Translation-en_US
==> default: Fetched 11.3 MB in 6s (1,804 kB/s)
==> default: Reading package listsā€¦
==> default: Reading package listsā€¦
==> default: Building dependency treeā€¦
==> default: Reading state informationā€¦
==> default: vim is already the newest version.
==> default: curl is already the newest version.
==> default: openssh-server is already the newest version.
==> default: wget is already the newest version.
==> default: The following extra packages will be installed:
==> default: git-man liberror-perl
==> default: Suggested packages:
==> default: git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-g
ui gitk
==> default: gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
==> default: The following NEW packages will be installed:
==> default: git git-man liberror-perl
==> default: 0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
==> default: Need to get 3,306 kB of archives.
==> default: After this operation, 21.9 MB of additional disk space will be used
.
==> default: Get:1 Index of /ubuntu trusty/main liberror-perl a
ll 0.17-1.1 [21.1 kB]
==> default: Get:2 Index of /ubuntu trusty-updates/main git-man
all 1:1.9.1-1ubuntu0.3 [699 kB]
==> default: Get:3 Index of /ubuntu trusty-updates/main git amd
64 1:1.9.1-1ubuntu0.3 [2,586 kB]
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directo
ry
==> default: Fetched 3,306 kB in 2s (1,299 kB/s)
==> default: Selecting previously unselected package liberror-perl.
==> default: (Reading database ā€¦ 62989 files and directories currently install
ed.)
==> default: Preparing to unpack ā€¦/liberror-perl_0.17-1.1_all.deb ā€¦
==> default: Unpacking liberror-perl (0.17-1.1) ā€¦
==> default: Selecting previously unselected package git-man.
==> default: Preparing to unpack ā€¦/git-man_1%3a1.9.1-1ubuntu0.3_all.deb ā€¦
==> default: Unpacking git-man (1:1.9.1-1ubuntu0.3) ā€¦
==> default: Selecting previously unselected package git.
==> default: Preparing to unpack ā€¦/git_1%3a1.9.1-1ubuntu0.3_amd64.deb ā€¦
==> default: Unpacking git (1:1.9.1-1ubuntu0.3) ā€¦
==> default: Processing triggers for man-db (2.6.7.1-1ubuntu1) ā€¦
==> default: Setting up liberror-perl (0.17-1.1) ā€¦
==> default: Setting up git-man (1:1.9.1-1ubuntu0.3) ā€¦
==> default: Setting up git (1:1.9.1-1ubuntu0.3) ā€¦
==> default: open /dev/tty: No such device or address
==> default: debconf: whiptail output the above errors, giving up!
==> default: Use of uninitialized value $ret in scalar chomp at /usr/share/perl5
/Debconf/Client/ConfModule.pm line 132, line 978.
==> default: Use of uninitialized value $ret in split at /usr/share/perl5/Debcon
f/Client/ConfModule.pm line 133, line 978.
==> default: Use of uninitialized value $ret[0] in string eq at /usr/share/perl5
/Debconf/Client/ConfModule.pm line 134, line 978.
==> default: tasksel: aptitude failed (255)
==> default: Reading package listsā€¦
==> default: Building dependency treeā€¦
==> default: Reading state informationā€¦
==> default: The following extra packages will be installed:
==> default: libxslt1.1
==> default: The following NEW packages will be installed:
==> default: libxslt1.1 php5-curl php5-gd php5-xsl
==> default: 0 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.
==> default: Need to get 214 kB of archives.
==> default: After this operation, 892 kB of additional disk space will be used.
==> default: Get:1 Index of /ubuntu trusty/main libxslt1.1 amd6
4 1.1.28-2build1 [145 kB]
==> default: Get:2 Index of /ubuntu trusty-updates/main php5-cu
rl amd64 5.5.9+dfsg-1ubuntu4.17 [27.3 kB]
==> default: Get:3 Index of /ubuntu trusty-updates/main php5-gd
amd64 5.5.9+dfsg-1ubuntu4.17 [27.9 kB]
==> default: Get:4 Index of /ubuntu trusty-updates/main php5-xs
l amd64 5.5.9+dfsg-1ubuntu4.17 [13.9 kB]
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directo
ry
==> default: Fetched 214 kB in 0s (562 kB/s)
==> default: Selecting previously unselected package libxslt1.1:amd64.
==> default: (Reading database ā€¦ 64939 files and directories currently install
ed.)
==> default: Preparing to unpack ā€¦/libxslt1.1_1.1.28-2build1_amd64.deb ā€¦
==> default: Unpacking libxslt1.1:amd64 (1.1.28-2build1) ā€¦
==> default: Selecting previously unselected package php5-curl.
==> default: Preparing to unpack ā€¦/php5-curl_5.5.9+dfsg-1ubuntu4.17_amd64.deb
ā€¦
==> default: Unpacking php5-curl (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default: Selecting previously unselected package php5-gd.
==> default: Preparing to unpack ā€¦/php5-gd_5.5.9+dfsg-1ubuntu4.17_amd64.deb ā€¦
.
==> default: Unpacking php5-gd (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default: Selecting previously unselected package php5-xsl.
==> default: Preparing to unpack ā€¦/php5-xsl_5.5.9+dfsg-1ubuntu4.17_amd64.deb .
ā€¦
==> default: Unpacking php5-xsl (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default: Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.17
) ā€¦
==> default: Setting up libxslt1.1:amd64 (1.1.28-2build1) ā€¦
==> default: Setting up php5-curl (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default: Creating config file /etc/php5/mods-available/curl.ini with new ver
sion
==> default: php5_invoke: Enable module curl for apache2 SAPI
==> default: php5_invoke: Enable module curl for cli SAPI
==> default: Setting up php5-gd (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default:
==> default: Creating config file /etc/php5/mods-available/gd.ini with new versi
on
==> default: php5_invoke: Enable module gd for apache2 SAPI
==> default: php5_invoke: Enable module gd for cli SAPI
==> default: Setting up php5-xsl (5.5.9+dfsg-1ubuntu4.17) ā€¦
==> default:
==> default: Creating config file /etc/php5/mods-available/xsl.ini with new vers
ion
==> default: php5_invoke: Enable module xsl for apache2 SAPI
==> default: php5_invoke: Enable module xsl for cli SAPI
==> default: Processing triggers for libc-bin (2.19-0ubuntu6.9) ā€¦
==> default: Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.17
) ā€¦
==> default: * Restarting web server apache2
==> default: AH00558: apache2: Could not reliably determine the serverā€™s fully q
ualified domain name, using 127.0.0.1. Set the ā€˜ServerNameā€™ directive globally t
o suppress this message
==> default: ā€¦done.
==> default: Adding user ojs' ... ==> default: Adding new group ojsā€™ (1002) ā€¦
==> default: Adding new user ojs' (1002) with group ojsā€™ ā€¦
==> default: Creating home directory /home/ojs' ... ==> default: Copying files from /etc/skelā€™ ā€¦
==> default: Installing OJS
==> default: /vagrant/scripts/ojs.sh: 2: cd: canā€™t cd to ~
==> default: /vagrant/scripts/ojs.sh: 3: /vagrant/scripts/ojs.sh:
: not found:
==> default: ERROR
==> default: 1045 (28000)
==> default: : Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: YES)
==> default: ERROR
==> default: 1045 (28000)
==> default: : Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: YES)
==> default: ERROR
==> default: 1045 (28000)
==> default: : Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: YES)
==> default: ERROR
==> default: 1045 (28000)
==> default: : Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: YES)
==> default: /vagrant/scripts/ojs.sh: 9: /vagrant/scripts/ojs.sh:
: not found:
==> default: /vagrant/scripts/ojs.sh: 10: cd:
==> default: canā€™t cd to www
==> default: /vagrant/scripts/ojs.sh: 11: /vagrant/scripts/ojs.sh:
: not found:
'.: Permission deniedould not create work tree dir '.
==> default: /vagrant/scripts/ojs.sh: 14: /vagrant/scripts/ojs.sh:
: not found: ./tools/startSubmodulesTRAVIS.sh
==> default: cp: cannot stat ā€˜config.TEMPLATE.inc.phpā€™
==> default: : No such file or directory
==> default: chgrp: cannot access ā€˜cacheā€™
==> default: : No such file or directory
==> default: chgrp: cannot access ā€˜publicā€™: No such file or directory
==> default: chgrp: cannot access ā€˜/home/ojs/filesā€™: No such file or directory
==> default: chgrp: cannot access ā€˜config.inc.php\rā€™: No such file or directory
==> default: chmod:
==> default: cannot access ā€˜cacheā€™
==> default: : No such file or directory
==> default: chmod:
==> default: cannot access ā€˜publicā€™
==> default: : No such file or directory
==> default: chmod:
==> default: cannot access ā€˜/home/ojs/filesā€™
==> default: : No such file or directory
==> default: chmod:
==> default: cannot access ā€˜config.inc.php\rā€™
==> default: : No such file or directory
==> default: /vagrant/scripts/ojs.sh: 19: /vagrant/scripts/ojs.sh:
: not found:
==> default: /vagrant/scripts/ojs.sh: 21: cd:
==> default: canā€™t cd to lib/pkp
==> default: /vagrant/scripts/ojs.sh: 22: /vagrant/scripts/ojs.sh:
: not found: php
==> default: c
==> default: u
==> default: r
==> default: l
==> default: :
==> default:
==> default: (
==> default: 2
==> default: 3
==> default: )
==> default:
==> default: F
==> default: a
==> default: i
==> default: l
==> default: e
==> default: d
==> default:
==> default: w
==> default: r
==> default: i
==> default: t
==> default: i
==> default: n
==> default: g
==> default:
==> default: b
==> default: o
==> default: d
==> default: y
==> default:
==> default: (
==> default: 0
==> default:
==> default: !
==> default: =
==> default:
==> default: 1
==> default: 6
==> default: 1
==> default: 3
==> default: 3
==> default: )
==> default: Could not open input file: composer.phar
==> default: /vagrant/scripts/ojs.sh: 24: /vagrant/scripts/ojs.sh:
: not found:
==> default: --2016-06-30 08:26:30-- http://localhost/ojs/index.php/index/insta
ll/install%0D
==> default: Resolving localhost (localhost)ā€¦
==> default: 127.0.0.1
==> default: Connecting to localhost (localhost)|127.0.0.1|:80ā€¦
==> default: connected.
==> default: HTTP request sent, awaiting responseā€¦
==> default: 404 Not Found
==> default: 2016-06-30 08:26:30 ERROR 404: Not Found.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
C:\vagrant [ojs-master +1 ~0 -0 !]>
C:\vagrant [ojs-master +1 ~0 -0 !]>

Any suggestions?

Edit: Windows 7, Oracle VM Virtualbox 5.0.24

Hi @ajnyga,

Iā€™ve just double-checked that the Vagrant image works with the latest image, and it seems fine. Have you tried again just in case of hiccough?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,

Thanks for looking into this. Yes, Iā€™ve tried this about ten times during the last few days. I will try this tomorrow with my mac if I have more luck.

I guess things start going wrong around here:

==> default: Adding user ojsā€™ ā€¦
==> default: Adding new groupojsā€™ (1002) ā€¦
==> default: Adding new user ojsā€™ (1002) with groupojsā€™ ā€¦
==> default: Creating home directory /home/ojsā€™ ā€¦
==> default: Copying files from/etc/skelā€™ ā€¦
==> default: Installing OJS
==> default: /vagrant/scripts/ojs.sh: 2: cd: canā€™t cd to ~
==> default: /vagrant/scripts/ojs.sh: 3: /vagrant/scripts/ojs.sh:
: not found:
==> default: ERROR
==> default: 1045 (28000)
==> default: : Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: YES)

Hi @ajnyga,

Yes, that looks like about where it goes wrong. One option would be to step through the scripts that prepare the VM manually and see where you first hit trouble. There are two scripts in the scripts/ subdirectory of the repo ā€“ the one thatā€™s failing as youā€™ve noted above is the first to be executed, scripts/setup.sh.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @ajnyga,

I ran into the same difficulty setting up vagrant on Windows. I was able to get around it by changing the EOL characters in ā€œscripts/ojs.shā€ from Windows format to UNIX. Installation proceed smoothly afterward. I used Notepad++.

1 Like

Wow, thanks! Would have never figured that out. I will let you know if it helps in my case.

Edit. Yes, that worked for me as well. Thank you so much for solving this!

Hi @seunboi,

Thanks for posting the solution!

Regards,
Alec Smecher
Public Knowledge Project Team