将Ubuntu升级到20.04后Imagemagick出现问题

时间:2020-11-08 12:49:23

标签: imagemagick ubuntu-20.04

最近我将Ubuntu升级到20.04版本。 不幸的是,升级后,出现了Imagemagick的问题。

$userQuery = $dbconn->prepare( 'SELECT username FROM users WHERE username = ?');

            $userQuery->bindValue( 1, $username );

            $userQuery->execute();

            $emailQuery = $dbconn->prepare( 'SELECT email FROM users WHERE email = ?' );

            $emailQuery->bindValue( 1, $email );

            $emailQuery->execute();

            
         if($userQuery->rowCount() > 0 && $emailQuery->rowCount() > 0  ) {
            
            echo '<p class="error" align="center">An account has already been made using this username</p>';
            echo '<p class="error" align="center">An account has already been made using this email address</p>';

        }



            else if( $userQuery->rowCount() > 0 ) { # If rows are found for query

            echo '<p class="error" align="center">An account has already been made using this username</p>';

        }
    
        else if( $emailQuery->rowCount() > 0 ) { # If rows are found for query

            echo '<p class="error" align="center">An account has already been made using this email address</p>';

            }

使用 identify convert 命令会返回与libIlmImf相同的错误。 作为没有经验的Ubuntu用户,我认为我可能会用一些软件包来解决这个问题。

$ magick
magick: error while loading shared libraries: libIlmImf-2_2.so.22: cannot open shared object file: No such file or directory

Grepping libIlmImf 还会返回预期的不同版本:

apt list --installed | grep magick

graphicsmagick/focal,now 1.4+really1.3.35-1 amd64 [installed,auto-removable]
imagemagick-6-common/focal-updates,focal-updates,focal-security,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 all [installed,automatic]
imagemagick-6.q16/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed]
libgraphicsmagick-q16-3/focal,now 1.4+really1.3.35-1 amd64 [installed,auto-removable]
libmagickcore-6.q16-6-extra/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]
libmagickcore-6.q16-6/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]
libmagickwand-6.q16-6/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]

which magick
/usr/local/bin/magick

升级后,是否有人遇到Imagemagick的问题?您对我有什么建议吗?

2 个答案:

答案 0 :(得分:1)

如马克·谢彻尔(Mark Setchell)所写

看起来您的libIlmImf是一个比ImageMagick想要的版本小的更新版本

不幸的是,由于依赖关系,我无法安装较低版本的软件包,并且我没有尝试建立符号链接。

但是我可以通过从 ubuntuupdates

下载较旧的软件包来使其运行

libopenexr22 libilmbase

然后我将这些文件复制到/usr/lib/x86_64-linux-gnu/,现在所有命令:identifyconvertmagick都很好。

答案 1 :(得分:0)

谢谢@mark-setchell!符号链接在我的情况下有效!

ln -s libIlmImf-2_3.so.24 libIlmImf-2_2.so.22