0

照片 无法运行该identify命令。请安装 ImageMagick。

Paperclip 在开发过程中一直运行良好,但突然我无法上传照片.. 没有安装 imagemagic,但它可以更早地工作。有人有线索吗?

这是我的控制台错误:

 Setting Load (0.1ms)  SELECT "settings".* FROM "settings" WHERE "settings"."id" = ? LIMIT 1  [["id", "14"]]
   (0.1ms)  begin transaction
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
4

1 回答 1

6

Paperclip 使用 ImageMagick,所以你在可以使用回形针之前就有了它。

ImageMagick 是许多软件的依赖项,因此它可能是由其他软件包安装的,然后在使用apt-get autoremove.

无论如何,您必须为回形针安装 ImageMagick 才能使用它的identifyconvert二进制文件:

apt-get install imagemagick

identify二进制文件用于检索图像的大小(即:您的原始图像,以存储其大小并可能对其进行验证)。

convert二进制文件用于更改图像,例如调整图像大小或更改格式(jpg、png 等)......在许多可能的转换中。有关完整详细信息,请参见其手册页。

于 2013-09-26T13:39:36.177 回答