Re: Moodle Problem with libgd compiled.
[email protected] ("Christoph M. Becker")
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On 09.01.2017 at 16:57, Rodrigo Cunha wrote: > Tks Christoph. > Feedback for this: > > I install this package and change the path for "with-gd" tp /usr > "--with-gd=/usr/", remove settings "--with-jpeg-dir" and "--with-jpeg-dir" > but not work for this. > I search in google for stdout "png.h" and find website : > http://zgadzaj.com/how-to-install-php-53-and-52-together-on-ubuntu-1204 > and for this error, the website recomend installing > sudo apt-get install libgd2-xpm-dev and set /usr > but not found too.I try this solution but the make step displayed error: > > //usr/lib/x86_64-linux-gnu/libXpm.so.4: error adding symbols: DSO missing > from command line > collect2: error: ld returned 1 exit status > Makefile:261: recipe for target 'sapi/cli/php' failed > make: *** [sapi/cli/php] Error 1 If you're building PHP yourself, I suggest to build it with the bundled libgd, and only to include support for the image formats that are needed. In the simplest case you just do ./configure … --with-gd That requires to have libpng-dev installed. If you also need JPEG support, you have to install something like libjpeg-dev and do ./configure … --with-gd --with-jpeg-dir Perhaps you have to explicitly specify the path to where libjpeg is installed, but at least on my Debian Jessie that's not necessary. Cheers, Christoph > 2017-01-09 12:26 GMT-02:00 Christoph M. Becker <[email protected]>: > >> On 09.01.2017 at 04:16, Rodrigo Cunha wrote: >> >>> i make lib-gd with option(./configure) "--with-gd" but not work. I >> Download >>> the lib in website and compile this, but >>> >>> my ./configure php displayed a stdout: >>> >>> " >>> >>> If configure fails try --with-vpx-dir=<DIR> >>> >>> If configure fails try --with-jpeg-dir=<DIR> >>> >>> configure: error: png.h not found.ls >> >> Apparently, libpng is not installed. You can install it with >> >> apt-get install libpng-dev >> >>> I installing the lib-gd with command >>> >>> #apt-get install php5-gd >>> >>> but i the new configure setting not work to.I find the lib installing in >> my >>> environment and >>> >>> the lib found in path:/usr/lib/x86_64-linux-gnu/. >>> >>> I want installing this lib easyli with command apt-get and setting the >>> ../configure setting with path for this. >>> >>> My configure: >>> >>> --with-gd=/usr/lib/x86_64-linux-gnu/ >>> --with-jpeg-dir=/usr/lib/x86_64-linux-gnu/ >>> --with-vpx-dir=/usr/lib/x86_64-linux-gnu/ >> >> That can't work, because the DIR has to contain the library as well as >> the headers. Try >> >> --with-gd=/usr >> >> You don't need the other config options (--with-jpeg-dir, >> --with-vpx-dir) if you're building against an external libgd, by the way. >> >> -- >> Christoph M. Becker >> >> > >