how would I go about best to install server-side / linux dependencies so I can use the wkhtmltopdf-library? I make use of the PHP Wrapper for wkhtmltopdf and have already added
to the composer.json. I am getting far enough as to see a specific error
/srv/www/test.website/current/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
@ned Awesome, thanks for pointing me there!! Very much appreciated.
Unfortunately I am still not there yet as I am facing an error when running ansible-playbook server.yml -e env=development -vvvv after having added the apt_packages in group_vars/all/main.yml like this:
PLAY [Install prerequisites] ***************************************************
TASK [Install Python 2.x] ******************************************************
task path: /xxx/ansible/server.yml:17
<192.168.50.5> ESTABLISH LOCAL CONNECTION FOR USER: xxx
<192.168.50.5> EXEC sudo -H -S -n -u root /bin/sh -c 'echo BECOME-SUCCESS-ycbasdrpztehrcegcnujaxxwdskhpigq; which python || sudo apt-get update && sudo apt-get install -qq -y python-simplejson'
System info:
Ansible 2.2.0.0; Darwin
Trellis at "Add `SKIP_GALAXY` env var to skip galaxy install in Vagrant"
---------------------------------------------------
sudo: apt-get: command not found
fatal: [192.168.50.5]: FAILED! => {
"changed": true,
"failed": true,
"invocation": {
"module_args": {
"_raw_params": "which python || sudo apt-get update && sudo apt-get install -qq -y python-simplejson"
},
"module_name": "raw"
},
"rc": 1,
"stderr": "sudo: apt-get: command not found\n",
"stdout": "/usr/local/bin/python\n",
"stdout_lines": [
"/usr/local/bin/python"
]
}
What do I make of this? Doesn’t make sense to me, everything else installed fine and I highly doubt that apt-get isn’t installed since I could “build” the server just fine and it is running without any problems.
Tried vagrant reload --provision but that doesn’t seem to install the packages though… Same error persist, checked the packages on the server (vagrant ssh) but they are not available (with the exception of libfontconfig?):
The above Trellis at... section is a rough indicator of your Trellis version based on CHANGELOG entries and suggests that your Trellis version (probably Jan 16, 2017) doesn’t have the apt_packages_custom feature @ned mentioned from roots/trellis#735 (added Jan 23, 2017). So you may need to update your Trellis for your list of apt_packages_custom to actually be installed.
More fundamentally, however, you may want to check @ned’s first clause, whether the packages are installable via apt. You could vagrant ssh then run commands to check whether these particular packages are available via apt and whether manual apt-get commands can install them (could google the commands). If those fail, then perhaps you’ll need to seek an alternative to using the apt_packages_custom variable.
Very well spotted, thanks for that…! Indeed my Trellis-install was way behind (roughly December 2016) and #734 was the last commit that was included
Did that already, all are available via apt.
Conclusion
It’s working now, thanks so much @ned & @fullyint! I had to update my local Trellis and then the apt_packages_custom-directives via main.yml came through smoothly (running vagrant reload --provision to spin the server anew).