Roots Discourse

Error while installing Mysql on Ubuntu 18.04 LTS on updated project that was working on Ubuntu 16 LTS

trellis

#1

This project had the old version of Trellis that was working with with Ubuntu 16 LTS. In order to work with the new server Ubuntu 18 LTS, I’ve copied all updates files from the new version of Trellis and Bedrock and replaced, skipping the configuration files such as wordpress_sites.yml, vault.yml and hosts folder. Also skipped app folder in “site/web/app” folder.

Any ideas?

TASK [mariadb : Install MySQL client] **********************************************************************************************************************************************************************

System info:

Ansible 2.6.1; Darwin

Trellis version (per changelog): "Add Python 2 explicitly"

---------------------------------------------------

'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options

::=--force-confold" install 'mariadb-client'' failed: E: Unable to

correct problems, you have held broken packages.

E: Unable to correct problems, you have held broken packages.

fatal: [165.128.134.215]: FAILED! => {"cache_update_time": 1547223067, "cache_updated": false, "changed": false, "rc": 100, "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-client : Depends: mariadb-client-10.2 (>= 1:10.2.21+maria~bionic) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " mariadb-client : Depends: mariadb-client-10.2 (>= 1:10.2.21+maria~bionic) but it is not going to be installed"]}

Server Info:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Additional information:
I tried to run the command (apt-get install mariadb-client) while logged in the server and it is showing this:
The following packages have unmet dependencies:

 mariadb-client : Depends: mariadb-client-10.2 (>= 1:10.2.21+maria~bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

#2

Weird. Any chance you could try on a completely new Trellis install to make sure all the right files are there?

Which VPS provider are you trying this on?


#3

I’m using Digital Ocean. I tried to create a new project and change the configuration file such as wordpress_sites.yml, vault.yml and hosts folder and now I’m getting a new error :grimacing::

ERROR! the role 'swapfile' was not found in /Users/alysonsm/Documents/Projects/test/trellis/roles:/Users/alysonsm/Documents/Projects/test/trellis/vendor/roles:/Users/alysonsm/Documents/Projects/test/trellis

The error appears to have been in '/Users/alysonsm/Documents/Projects/test/trellis/server.yml': line 24, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - { role: common, tags: [common] }
    - { role: swapfile, swapfile_size: 1GB, swapfile_file: /swapfile, tags: [swapfile] }
      ^ here

Additional Information:
I noticed that the vendor folder is not in trellis folder.


#4

Hey Man, Thanks for your response.

I figured what was the problem. The droplet created has a LAMP stack on it. I solved the problem destroying the droplet and creating a new one with nothing installed. I’m getting a letsencrypt error but I guess there is another thread that talks about that.


#5

I am seeing a similar issue when deploying FROM a ubuntu docker (running 18.04) to make the deployment. If I deploy FROM my MacOS box it works fine… some more context.

The docker I am using is statenweb/trellis-deploy and the tag is 3.0.0 – i just rebuilt the docker to run 18.04 thinking that may fix it but it did not. Dockerhub link: https://hub.docker.com/r/statenweb/trellis-deploy/tags

Run composer install is a custom ta

TASK [deploy : Run composer install] *******************************************
System info:
  Ansible 2.7.2; Linux
  Trellis version (per changelog): "Add Python 2 explicitly"
---------------------------------------------------
[Errno 2] No such file or directory
fatal: [newsite.com]: FAILED! => {"changed": false, "cmd": "composer install", "rc": 2}
	to retry, use: --limit @/root/project/trellis/deploy.retry

PLAY RECAP *********************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=0   
newsite.com              : ok=11   changed=4    unreachable=0    failed=1   

Exited with code 2

#6

This one may be on me, hang tight.


#7

safely ignore, my docker image didn’t have composer on it. this theme required running composer on the theme itself because of libraries. latest docker straightened it out (3.0.1) – hopefully will have a tutorial on using a docker to deploy for CI/CD :slight_smile: