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

Company-Client-Value (CCV) System

Formal Definition      The Company–Client–Value (CCV) System is a relational framework that defines the dynamic equilibrium between the origin of belief (the company), the recipient and mirror of belief (the client), and the shared symbolic core (the value).      It models how institutional meaning is co-created, transmitted, and stabilized between organizations and their external constituencies, forming the fundamental triad that underlies every economic, cultural, or ideological ecosystem. 1. Conceptual Essence      The CCV system asserts that all sustainable institutions are founded on a shared value field;  an implicit agreement of meaning between producer and participant.      The company originates and expresses a value; the client perceives, validates, and reciprocates it. Between them stands the value itself,  the symbolic medium that both sides recognize as true.      When all three p...

linux firsts

i came across the linux timeline in wikipedia and learned that there are three major distros(distributions) where most of them came from. debian slackware redhat ubuntu, KNOPPIX and gibraltar are some of the distros that were based from debian. i would say it's a cross between slackware and redhat - and that's based from some of my research. i just dont have time to post details madriva, fedora and the "philippines distro" bayanihan are based from redhat. a very corporate feel and stable distro if you ask me slackware, which was the basis of openSuSE and vector, is a hobbyist distro basing from its history. althought, its support and community are as stable.

Institutional Value Index (IVI)

Formal Definition      The Institutional Value Index (IVI) is a multidimensional metric system that quantifies the vitality, coherence, and transmissibility of belief-based value within and around an institution.      It measures the degree to which an organization’s philosophy, behavior, and symbolic expression remain aligned across internal and external ecosystems, thereby predicting its capacity for long-term resilience and cultural endurance. 1. Conceptual Essence      Where the IVC defines how value flows, and the CCV System defines where it originates and reflects, the IVI defines how strong and stable that flow is.      In essence, IVI is the heartbeat of institutional meaning — converting the intangible (belief, trust, resonance) into a numerical signature that can be compared, tracked, and improved. 2. Structural Composition      The IVI aggregates six value strata (from the IVC) into ...