最后更新于 .

php的gd库可以说是基本的库,我想什么网站都要用到,验证码,水印,缩略图等。

可是编译安装php的时候,gd库的各种支持确实让人头疼

由于jpg格式不是完全免费开源的(具体遵循协议懒得看了)所以php默认不会将jpg编译进来

而且很多人编译的时候会发现明明加了--with-jpeg-dir参数,确还是没有启用jpg支持

最终,我发现了其中的奥妙。

先用gdlib-config --all命令,看一下你的gd库路径到底在哪儿,还有gd到底是不是支持jpeg

我们的答案是:

GD library  2.0.36

includedir: /usr/include

cflags:     -I/usr/include

ldflags:      -L/usr/lib -Wl,-Bsymbolic-functions

libs:       -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm

libdir:     /usr/lib

features:   GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON

GD library  2.0.36includedir: /usr/includecflags:     -I/usr/includeldflags:      -L/usr/lib -Wl,-Bsymbolic-functionslibs:       -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm  libdir:     /usr/libfeatures:   GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON

gd库路径是/usr/lib,而且支持jpeg

那么编译吧,./configure --with-gd --with-jpeg-dir=/usr/lib

make

sudo make install

怎么还是不行?

我的经验,先make clean,然后再make ;sudo make install,这次肯定没问题了,试试吧。

Pingbacks

Pingbacks已关闭。

评论

  1. snow blower

    snow blower 发布于 #

    Үߋu're so cool! I do not beⅼieve Ι'vᥱ гead through ɑ single thing like this beforе.

    Տo nice to discover anotһer person with unique thouǥhts on thiѕ topic.

    Sеriously.. tҺank you for starting tҺis up. Ƭhiѕ website
    is ѕomething tɦat is neеded ⲟn the web, ѕomeone with
    ѕome originality!

  2. rochester.eventful.com

    rochester.eventful.com 发布于 #

    Today, I went to the beachfront with my children. I found
    a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is entirely off
    topic but I had to tell someone!

  3. garcinia cambogia extract ultra

    garcinia cambogia extract ultra 发布于 #

    Garcinia cambogia is not a miracle pill that may enable you to slim down while eating pizza on the sofa all day.

  4. Cary

    Cary 发布于 #

    Ultimately, the greatest Garcinia cambogia results
    have come from combining the supplement with exercise and diet.

  5. Candelaria

    Candelaria 发布于 #

    Women shouldn't take a testosterone supplement unless otherwise advised by a physician.

  6. Lena

    Lena 发布于 #

    Both of these studies come on the heels of a recent pooled analysis by researchers at Beth Israel Deaconess Medical Center
    in Boston, which cast further doubt on the link between testosterone therapy and cardiovascular risk and suggested a positive association between higher testosterone levels
    and developments in reduction of cardiovascular risk.

  7. testosterone therapy side effects

    testosterone therapy side effects 发布于 #

    He highlighted as testosterone therapy may not have an impact, that given these study results, it's important for doctors to continue
    to aggressively handle established cardiovascular disease risk factors in patients.

  8. Albertha

    Albertha 发布于 #

    There is almost no need to go to knowledgeable photo printer to have your
    photos printed.

  9. Brandy

    Brandy 发布于 #

    The illustration below reveals you a double web page example of a novel I printed not too long ago
    which provides you with an concept of what your guide may appear to
    be. Again take your time, be affected person and observe instructions and you can print a e-book your self and
    bind it with your own homemade binding jig featured in my first hub.

  10. web hosting wordpress theme

    web hosting wordpress theme 发布于 #

    In Adobe Acrobat Reader's print menu, you can choose the Poster choice to print the 20 x 30-inch picture on eight eight.5 x
    eleven-inch paper.

  11. Shad

    Shad 发布于 #

    Make a giant impression with good printouts from the compact,
    arduous-working 1250c printer.Experience rich, true-to-life tones with Colour by Dell And relaxation easy understanding your
    paperwork will print proper, thanks to Dell Clear
    View LED expertise.

  12. tsohost ftp address

    tsohost ftp address 发布于 #

    Dasher is hard to describe. Basically it's a radically different input methodology the
    place you don't have to the touch the display in any
    respect!

  13. Zoe

    Zoe 发布于 #

    The toner is transferred to the paper.

  14. tsohost lite hosting

    tsohost lite hosting 发布于 #

    We are primarily coping with 70/80g,a hundred/120g Fast Dry Sublimation Paper,100g Medium/High Sticky Sublimation Paper, Light/Dark T-shirt Transfer Paper, Dye Sublimation Ink.

  15. Eloise

    Eloise 发布于 #

    Report adverse events including testosterone therapy to the FDA MedWatch program, using the advice in the Contact FDA” box at the bottom of
    the page.

  16. Clifton

    Clifton 发布于 #

    The expense of these medications is approximately around $10
    for a 10 cc vial, which is adequate for fifteen weeks.

  17. Margarita

    Margarita 发布于 #

    And with that, you're completed!

  18. Leland

    Leland 发布于 #

    When I try to retrieve a every day studying from an app that I actually have used earlier than with success I now get an error that I am unable to retrieve
    that studying. My spouse is able to get the file on her ipad.

  19. Valeria

    Valeria 发布于 #

    Thanks for stopping by, jocent and preweb!

  20. Joan

    Joan 发布于 #

    SureType is an enter methodology that added another eight keys (4 to every facet) to for a grid of
    20 keys.

发表评论