Hi there,
I’m new to this community, so if I’m doing anything wrong or there is anything I’m missing (need more info? Not sure), please let me know.
I’m using Trellis with the regular setup (Bedrock, Sage) but using the Sage 9.0.0-beta for my theme. I encountered some sort of PHP problem when I most recently deployed my site to my staging environment , which wasn’t present on my development environment (deployment was successful). I wanted to use xdebug to try to figure out what’s going on, as per https://roots.io/trellis/docs/debugging-php/ guide.
However, when I run the command ./bin/xdebug-tunnel.sh open staging
, I get this error at the TASK [xdebug : Install Xdebug]
stage:
System info:
Ansible 2.2.1.0; Linux
Trellis 0.9.9: December 14th, 2016
---------------------------------------------------
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
::=--force-confold" install 'php-xdebug'' failed: E: Could not open lock
file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you
root?
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you
root?
fatal: [<my staging server>]: FAILED! => {"cache_update_time": 1487225626, "cache_updated": false, "changed": false, "failed": true, "stdout": "", "stdout_lines": []}
to retry, use: --limit @<my code path>/trellis/xdebug-tunnel.retry
PLAY RECAP *********************************************************************
<my staging server> : ok=5 changed=0 unreachable=0 failed=1
I really am not sure what is happening. The user I have configured is a sudoer, and deployment works fine with that user, so I’m not sure why it’s lacking permissions. I tried rebooting the remote machine (it’s a digitalocean droplet) and running again with no improvement.
Thanks for looking into this.