Skip to main content

PHP Error: Unable to load dynamic library 'gd'

Currently installing Laravel on my Arch Linux.

I got PHP, MySQL, Apache and Composer installed and trying to install Laravel with this:

$ composer global require laravel/installer

 But got this instead:

PHP Warning:  PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib/php/modules/gd (/usr/lib/php/modules/gd: cannot open shared object file: No such file or directory), /usr/lib/php/modules/gd.so (/usr/lib/php/modules/gd.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/lib/php/modules/openssl.so (/usr/lib/php/modules/openssl.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/openssl.so.so (/usr/lib/php/modules/openssl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning:  PHP Startup: Unable to load dynamic library 'phar.so' (tried: /usr/lib/php/modules/phar.so (/usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/phar.so.so (/usr/lib/php/modules/phar.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning:  Phar::mapPhar(): open_basedir restriction in effect. File(/usr/bin/composer) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/) in /usr/bin/composer on line 28 PHP Warning:  require(phar://composer.phar/bin/composer): Failed to open stream: phar error: invalid url or non-existent phar "phar://composer.phar/bin/composer" in /usr/bin/composer on line 29 PHP Fatal error:  Uncaught Error: Failed opening required 'phar://composer.phar/bin/composer' (include_path='.:') in /usr/bin/composer:29 Stack trace: #0 {main}   thrown in /usr/bin/composer on line 29
And so I have six errors and I'll be going through all of them one by one. I decided to document it here as a journal which can serve as a note for the future.

First up is the "Unable to load dynamic library 'gd'". 

This means "there's something wrong with gd.

What can we do?
  1. Back up libgd.so first.
  2. Restart server and install again
What is libgd.so? It's a GD Graphics library in a shared object file
  • lib is for library
  • gd is for GD Graphics or GIF Draw graphics
  • .so is an extension name for shared objects file
So the error message is saying that it's unable to load the shared object. I checked the folder and it's not there. Next is to download and install: 

$ sudo pacman -S php-gd

Then restart httpd.service.

Installed Laravel again and the error message is gone, but not all. 

So on to the next one.

Popular

budgeting 101

to dig deep into envelope budgeting, i must simplify the term first. hence, i need to make sure i understand the word budgeting... budget. A budget (from old French bougette , purse) is a financial plan and a list of all planned expenses and revenues. It is a plan for saving, borrowing and spending -  wikipedia so, basing from the definition, it can be simplified as... (income - expense = 0) where income is defined(in my own words) as any monetary device labeled with currency which was received and/or is available to be consumed by the calculated expenses. while expense is a calculation of how the income will be used. some might ask where saving lies in the formula. since, i believe that it is one of the elements of expenses, let me extend the formula to: [income - (saving +other expenses) = 0] i still have doubts on this calculations, though. so, any comments and suggestions are encouraged for a healthy discussion.

box machine

here he is... it's been quite a while but it's good...very good. dominic got it to 130 km/h. and for an old engine it's very good. paint job is nice thought it still has one last buff to finish. also like the stance and the rims. can't wait to drive it again

The Framework Revolution: How SPMP and MF4:SPIC Are Redefining Creation with AI

Imagine a world where frameworks aren’t rigid, pre-packaged codebases you download from a repository. Imagine instead a process so fluid, so powerful, that it lets you define your vision, hands it to an AI, and watches as a custom system—tailored to your exact needs—emerges before your eyes. Then, imagine refining it with a few tweaks until it’s perfect. This isn’t science fiction—it’s what we’ve built with SPMP(Standard PHP-MVC-Principles) and a groundbreaking process called MF4:SPIC(Meta Framework For Framework: a Standard Process for Idea Creation) MF4 for short. Let me take you behind the scenes of a discovery that’s changing how we think about creation. The Seed: SPMP and a New Kind of Framework It started with SPMP—Standard PHP-MVC-Principles—a lightweight, PHP-based framework I co-developed with an AI collaborator (let’s call it Grok, because that’s what it is). Unlike Laravel or Django, SPMP isn’t something you composer install . It’s a document—a set of principles, instructi...