Installed Ubuntu 19.4 LTS locally.
Installed everything needed with no problems and cloned the project with this steps and notes:
sudo apt update
sudo apt install php7.2-cli
sudo apt install openssh-server
1. composer
https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
sudo mv composer.phar /usr/local/bin/composer
$ composer => answer ok
2. virtualbox
https://vitux.com/how-to-install-virtualbox-on-ubuntu/
3. vagrant
https://linuxize.com/post/how-to-install-vagrant-on-ubuntu-18-04/
sudo apt install vagrant
ok version 2.2.3
4. sudo apt install git
sudo git clone https://github.com/timble/openpolice-platform.git
5. cd openo..
sudo vagrant up
Tried to run with “sudo vagrant up”
This is the console output:
*** output 1 START ***
…
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 5.2
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
#<Thread:0x000055b5f66f00c0@/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
...
1: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/ssh/communicator.rb:267:in `sudo'
/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/ssh/communicator.rb:257:in `execute': The following SSH command responded with a non-zero exit status. (Vagrant::Errors::NFSMountFailed)
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.52.1:/home/david/openpolice-platform /var/www/police.dev
Stdout from the command:
Stderr from the command:
mount.nfs: requested NFS version or transport protocol is not supported
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.52.1:/home/david/openpolice-platform /var/www/police.dev
Stdout from the command:
Stderr from the command:
mount.nfs: requested NFS version or transport protocol is not supported
*** output 1 END ***
So the error comes from the incompatibility of the VirtualBox Guest Additions.
Notice versions:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 5.2
So tried to update the Guest Additions:
A) first attempt
>> sudo vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
=> ERROR:
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies fog-core (~> 1.43.0) and fog-core (= 1.45.0)
Activated fog-core-1.45.0
which does not match conflicting dependency (~> 1.43.0)
Conflicting dependency chains:
fog-core (= 1.45.0), 1.45.0 activated
versus:
vagrant-libvirt (> 0), 0.0.41 activated, depends on
fog-core (~> 1.43.0)
sudo vagrant halt
https://stackoverflow.com/questions/49180469/vagrant-2-0-2-fails-to-install-plugins
https://stackoverflow.com/questions/45760176/bundler-how-to-uninstall-conflicting-dependency
VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-vbguest
sudo reboot
+++++++++++
Also checked
sudo apt install nfs-kernel-server
it was up to date.
Checked the NFS configuration file and noticed duplicated entry...:
# VAGRANT-BEGIN: 0 392f6b0a-6749-400e-8907-71b551c071bd
"/home/david/openpolice-platform" 192.168.52.10(rw,no_subtree_check,all_squash,anonuid=0,anongid=0,fsid=2756773252)
"/home/david/openpolice-platform" 192.168.52.10(rw,no_subtree_check,all_squash,anonuid=0,anongid=0,fsid=2756773252)
# VAGRANT-END: 0 392f6b0a-6749-400e-8907-71b551c071bd
.. so made a backup and erased one of the duplicated lines
sudo cp -a /etc/exports /etc/exports.backup
sudo nano /etc/exports
(then erase duplicated line)
sudo service nfs-kernel-server restart