pkg-config 无法在 OpenSUSE Leap 15.2 中找到 libmagic 或无法在 Open Suse Leap 15.2 中安装 libmagic

pkg-config unable to find libmagic in OpenSUSE Leap 15.2 or unable to install libmagic in Open Suse Leap 15.2

我在 OpenSUSE 15.2 中,我正在尝试编译一个使用 lib magic 的 Autools 库,但它找不到 lib magic 或者它没有安装在我的系统中。

当我 运行 pkg-config --list-all | grep -i magic 我得到:

ImageMagick                    ImageMagick - ImageMagick - convert, edit, and compose images (ABI Q16HDRI)
GraphicsMagickWand             GraphicsMagickWand - GraphicsMagick Wand image processing library
Magick++-7.Q16HDRI             Magick++ - Magick++ - C++ API for ImageMagick (ABI Q16HDRI)
MagickCore                     MagickCore - MagickCore - C API for ImageMagick (ABI Q16HDRI)
GraphicsMagick++               GraphicsMagick++ - C++ API for GraphicsMagick image processing library
MagickWand-7.Q16HDRI           MagickWand - MagickWand - C API for ImageMagick (ABI Q16HDRI)
GraphicsMagick                 GraphicsMagick - GraphicsMagick image processing library
ImageMagick-7.Q16HDRI          ImageMagick - ImageMagick - convert, edit, and compose images (ABI Q16HDRI)
MagickWand                     MagickWand - MagickWand - C API for ImageMagick (ABI Q16HDRI)
Magick++                       Magick++ - Magick++ - C++ API for ImageMagick (ABI Q16HDRI)
MagickCore-7.Q16HDRI           MagickCore - MagickCore - C API for ImageMagick (ABI Q16HDRI)

我安装了以下安装了 word magic 的软件包:

    S  | Name                        | Summary                                                         | Type
    ---+-----------------------------+-----------------------------------------------------------------+------
    i+ | GraphicsMagick-devel        | Development files for the GraphicsMagick C language API         | Paket
    i  | ImageMagick                 | Betrachter und Konverter für Bilder                             | Paket
    i  | ImageMagick-config-7-SUSE   | Upstream Configuration Files                                    | Paket
    i+ | ImageMagick-devel           | Development files for ImageMagick's C interface                 | Paket
    i  | file-magic                  | Database for libmagic to help identify files                    | Paket
    i  | libGraphicsMagick++-Q16-12  | C++ interface for the GraphisMagick image conversion library    | Paket
    i+ | libGraphicsMagick++-devel   | Development files for the GraphicsMagick C++ language API       | Paket
    i  | libGraphicsMagick-Q16-3     | The GraphicsMagick image conversion runtime library             | Paket
    i  | libGraphicsMagick3-config   | Configuration for the GraphicsMagick image conversion library   | Paket
    i  | libGraphicsMagickWand-Q16-2 | Runtime library for the GraphicsMagick image conversion library | Paket
    i  | libMagick++-7_Q16HDRI4      | C++ interface runtime library for ImageMagick                   | Paket
    i+ | libMagick++-devel           | Development files for ImageMagick's C++ interface               | Paket
    i  | libMagickCore-7_Q16HDRI6    | C runtime library for ImageMagick                               | Paket
    i  | libMagickWand-7_Q16HDRI6    | C runtime library for ImageMagick                               | Paket
    i  | libmagic1                   | Library for heuristic file type identification                  | Paket
    i  | perl-Variable-Magic         | Associate user-defined magic to variables from Perl             | Paket

应该是file-devel

...
   | enlightenment-profiles-openSUSE            | Enlightenment openSUSE profiles                                                | package
i  | file                                       | A Tool to Determine File Types                                                 | package
i+ | file-devel                                 | Development files for libmagic, a library to determine file types              | package
   | file-devel-32bit                           | Development files for libmagic, a library to determine file types              | package
i  | file-magic                                 | Database for libmagic to help identify files                                   | package
   | file-roller                                | An Archive Manager for GNOME                                                   | package
...