Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails osx yosemite-brew安装imagemagick失败,brew链接错误_Ruby On Rails_Imagemagick_Osx Yosemite - Fatal编程技术网

Ruby on rails osx yosemite-brew安装imagemagick失败,brew链接错误

Ruby on rails osx yosemite-brew安装imagemagick失败,brew链接错误,ruby-on-rails,imagemagick,osx-yosemite,Ruby On Rails,Imagemagick,Osx Yosemite,我正在构建一个需要imagemagick的Rails项目。 我已在下面的安装过程中发布了错误: $brew install imagemagick Error: You must `brew link jpeg' before imagemagick can be installed $brew link jpeg Linking /usr/local/Cellar/jpeg/8d... Error: Could not symlink lib/libjpeg.a Target /usr/lo

我正在构建一个需要imagemagick的Rails项目。 我已在下面的安装过程中发布了错误:

$brew install imagemagick
Error: You must `brew link jpeg' before imagemagick can be installed

$brew link jpeg
Linking /usr/local/Cellar/jpeg/8d...
Error: Could not symlink lib/libjpeg.a
Target /usr/local/lib/libjpeg.a
already exists. You may want to remove it:
  rm '/usr/local/lib/libjpeg.a'
我试图删除它,链接jpeg,然后重新安装。但它不起作用。当我试图在rails应用程序中附加一张照片时,它仍然说“请安装imagemagick”

运行OSX 10.10.5,有人知道如何修复它吗

编辑:

我试图从源代码处重新安装它,但出现以下错误

$brew install imagemagick --build-from-source
==> Downloading http://www.imagemagick.org/download/releases/ImageMagick-6.9.1-1
######################################################################## 100.0%
==> ./configure --disable-osx-universal-binary --prefix=/usr/local/Cellar/imagem
==> make install
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [magick/libMagickCore-6.Q16.la] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
但我没有安装MacPorts或Fink。有解决办法吗

Edit2:

在我删除jpeg并重新安装imagemagick后,它仍然失败。从这些信息中有什么想法吗

$brew info imagemagick
imagemagick: stable 6.9.1-10 (bottled), HEAD
Tools and libraries to manipulate images in many formats
http://www.imagemagick.org
/usr/local/Cellar/imagemagick/6.9.1-10 (1447 files, 22M)
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/imagemagick.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Required: xz ✔, libtool ✔
Recommended: jpeg ✔, libpng ✔, libtiff ✔, freetype ✔
Optional: fontconfig ✘, little-cms ✘, little-cms2 ✘, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✘, webp ✘, fftw ✘, pango ✘
==> Options
--with-fftw
    Compile with FFTW support
--with-fontconfig
    Build with fontconfig support
--with-ghostscript
    Build with ghostscript support
--with-hdri
    Compile with HDRI support
--with-jp2
    Compile with Jpeg2000 support
--with-liblqr
    Build with liblqr support
--with-librsvg
    Build with librsvg support
--with-libwmf
    Build with libwmf support
--with-little-cms
    Build with little-cms support
--with-little-cms2
    Build with little-cms2 support
--with-openexr
    Build with openexr support
--with-openmp
    Compile with OpenMP support
--with-pango
    Build with pango support
--with-perl
    enable build/install of PerlMagick
--with-quantum-depth-16
    Compile with a quantum depth of 16 bit
--with-quantum-depth-32
    Compile with a quantum depth of 32 bit
--with-quantum-depth-8
    Compile with a quantum depth of 8 bit
--with-webp
    Build with webp support
--with-x11
    Build with x11 support
--without-freetype
    Build without freetype support
--without-jpeg
    Build without jpeg support
--without-libpng
    Build without libpng support
--without-libtiff
    Build without libtiff support
--without-magick-plus-plus
    disable build/install of Magick++
--without-opencl
    Disable OpenCL
--HEAD
    Install HEAD version

您删除了“/usr/local/lib/libjpeg.a”,但它仍然无法链接?您能否确认它已被删除,例如
ls/usr/local/lib/libjpeg.a
?是的,它已被删除。然后我再次尝试安装imagemagick,它会自动为我重新安装jpeg。但是imagemagicks仍然不能正常工作。最后,我通过重新安装rails成功了