在CentOS 7.1上,我会遇到以下错误:
Fatal error: Call to undefined function exif_imagetype() in /some/path/to/a/php.file.php on line XXX我可以在下面的行中在/usr/local/lib/php.ini中启用这个功能:
870 ;extension=php_mbstring.dll
871 ;extension=php_exif.dll ; Must be after mbstring as it depends on it但是exif库在我的系统上是找不到的!find / -name exif找不到任何东西。
当我做yum search时,我会得到以下软件包:
libexif-devel.i686 : Files needed for libexif application development
libexif-devel.x86_64 : Files needed for libexif application development
libexif-doc.x86_64 : The EXIF Library API documentation
exiv2.x86_64 : Exif and Iptc metadata manipulation library
exiv2-libs.i686 : Exif and Iptc metadata manipulation library
exiv2-libs.x86_64 : Exif and Iptc metadata manipulation library
libexif.i686 : Library for extracting extra information from image files
libexif.x86_64 : Library for extracting extra information from image files我的问题是,如果我删除;,将php_exif.dll和php_mbstring.dll重命名为php_mbstring.so/php_exif.so,我会消除这个错误,还是需要安装一个软件包?
我不熟悉这个软件!
发布于 2016-04-21 14:45:29
如果你跑:
$ yum provides php-exif
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: repo.bigstepcloud.com
* epel: ftp.heanet.ie
* extras: mirror.sov.uk.goscomb.net
* updates: centos.serverspace.co.uk
php-common-5.4.16-36.el7_1.x86_64 : Common files for PHP
Repo : base
Matched from:
Provides : php-exif
php-common-5.4.16-36.el7_1.x86_64 : Common files for PHP
Repo : @base
Matched from:
Provides : php-exif您将看到php-exif是php-common包的一部分。如果您已经安装了php,那么php-common将作为依赖项安装。
因此,您应该可以删除分号。
发布于 2020-03-16 22:49:14
这是一个很容易解决的问题,我阅读并尝试了所建议的内容,但在我的情况下,它不起作用。我所做的只是
Yum search exif*Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4:
* cpanel-addons-production-feed:
* cpanel-plugins:
* base: centos4.zswap.net
* epel: mirror.team-cymru.com
* extras: centos4.zswap.net
* updates: centos4.zswap.net
================================================ N/S matched: exif ================================================
libexif-devel.i686 : Files needed for libexif application development
libexif-devel.x86_64 : Files needed for libexif application development
libexif-doc.x86_64 : The EXIF Library API documentation
ea-php54-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php55-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php56-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php70-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php71-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php72-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php73-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
exiv2.x86_64 : Exif and Iptc metadata manipulation library
exiv2-libs.i686 : Exif and Iptc metadata manipulation library
exiv2-libs.x86_64 : Exif and Iptc metadata manipulation library
jhead.x86_64 : Tool for displaying EXIF data embedded in JPEG images
libexif.i686 : Library for extracting extra information from image files
libexif.x86_64 : Library for extracting extra information from image files
metadata-extractor2.noarch : Extracts EXIF, IPTC, XMP, ICC and other metadata from image files
nodejs-duplexify.noarch : Turn a writeable and readable stream into a single streams2 duplex stream
perl-Image-ExifTool.noarch : Utility for reading and writing image meta info
renrot.noarch : A program to rename and rotate files according to EXIF tags*下一首
yum install ea-php73-php-exif.x86_64 -y就是这样。
https://unix.stackexchange.com/questions/278120
复制相似问题