Skip to main content

Lando - ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Lando is a local development environment tool, and it might not directly support the installation of system-wide packages like libGL. However, you can make sure that the required dependencies are included in your application's environment by modifying its configuration.

 

Here's a general approach to include libGL in your Lando configuration

 

Lando set-up running Drupal and Python

Lando is a development environment tool that makes it easier to set up and manage local development environments for web applications. To use Python within a Lando-based development environment, you can follow these general steps:

 

Create a Lando Configuration File

Make sure you have a Lando configuration file (e.g., .lando.yml) in your project's root directory. If you don't have one, you can create it. Here's a basic example:

Lando setup running Drupal 10

Create a Lando setup running Drupal 10.

The command you provided appears to be a Lando configuration command for initialising a new Lando environment for a Drupal 10 project. Following is a breakdown of the command and what it does:

CLI using drush to drop tables in your db and reload

This is a relatively quick process, beginning with dropping the database tables

lando drush sql-drop -y

Import a MySQL database

lando db-import {filename}

such as 

lando db-import riverdev.2022-10-03-1664769553.sql.gz

Rebuild cache

lando drush cr

Finally, export your config

Running Drupal 9 locally with lando using remote files and db

Import a database

lando db-import doj.sql

Enter the MySQL database

lando mysql -h database

This action will change the prompt as you are now in mysql.  The prompt will start with

mysql>

Now change to the database that you want to use

use doj;

If you want to know what databases exist, then run

Create a MySQL database using command line (CLI)

On your local OSX environment using Terminal or iTerm you can create a MySQL database, database user, and password, as well as, assign all privileges to the user for the database.

Knowing your credentials, before beginning you will need to know the following:

user: {user}
password: {password}
database: {database}

For my local environment, I'll be using these credentials

How to access Lando logs on your Mac / Linux sys

Working in Lando and you have hit the situation where you need to view the log files.  Where?  How?

Lando has several log layers to assist in diagnosing many of the issues you might encounter.

 

Install Logs

Failed installation?  Find logs in the following locations:

macOS - /var/log/install.log
Linux - Differs per system but check common apt or dnf/yum logs

 

Runtime Logs

Runtime?  Check:

Working with Lando

Changes in your .env file

Connecting your app to the new environment you need to make some tweaks in your .env file.

Change your DB_HOST to database. If you use MySQL or MariaDB Lando will create a database named laravel for you with a user laravel and the password laravel. The database section in your .env should look like this:

Subscribe to Lando