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

How AI is Revolutionizing Industries in the Philippines: Manufacturing, Healthcare, and Retail

The rise of artificial intelligence (AI) is reshaping industries around the globe, and the Philippines is no exception. As the country continues to embrace digital transformation, AI has become a game-changer for key sectors like manufacturing, healthcare, and retail. In this blog, we explore how AI is specifically transforming these industries and why it’s crucial for businesses to integrate AI solutions. AI in Manufacturing: Streamlining Processes and Boosting Efficiency Manufacturing is a vital part of the Philippine economy, and AI is poised to revolutionize this sector. AI can automate repetitive tasks, such as assembly and quality control, significantly improving production efficiency. Predictive maintenance powered by AI can prevent costly machine breakdowns by predicting potential failures before they occur. Additionally, AI’s ability to optimize supply chains ensures better inventory management and cost savings. With AI’s potential to reduce downtime, streamline logistics, and...

task manager: before clicking end process - part 2

continuation of the 1st part 1. igfxpers.exe - is a process installed alongside NVidia graphics cards and provides additional configuration options for these devices. "This program is a non-essential process, but should not be terminated unless suspected to be causing problems." processlibrary.com says its not a critical component. so there's nothing to worry about 2. igfxsrvc.exe - is a process associated with Intel(R) Common User Interface from Intel Corporation. It is installed with graphic card drivers with Intel chipsets. This program is important for the stable and secure running of your computer and should not be terminated. from processlibrary.com i wouldn't want to terminate this. 3. igfxtray.exe - is a process which allows you to access the Intel Graphics configuration and diagnostic application for the Intel 810 series graphics chipset. This program is a non-essential system process, and is installed for ease of use via the desktop tray. also ...

gamer 2009

i got interested with the gamer because of gerard butler - very good acting on 300 . but it didn't started there. it started with the spy next door of jackie chan where i saw amber valletta . and as an info geek that i am, i searched for other movies she starred. and gamer was her last movie before the comedy/spy flick. review? it's bloody, sexy and cool! which means it's good. i would recommend it to be watched on the big screen. but hd/plasma at home will do.