2020-09-17

gem installでnokogiriとrmagickが失敗する場合

なぜ失敗するかというと、nokogiriとrmagickはシステムに特定のソフトウェアやライブラリが入っていることに依存しているからだ。依存しているソフトウェアやライブラリをPATHの通った場所に用意してやらなければビルドができない。

nokogiriで問題になるのは主にlibxml2だ。nokogiriは独自のパッチをあてたlibxml2をビルドして使う。libxml2のビルドに必要になるソフトウェアとライブラリがある。

具体的な方法は公式ドキュメントに情報がある。

Installing Nokogiri - Nokogiri

特に入っていない可能性が高いのはzlibとliblzmaだ。Debian系ならば以下のようにパッケージをインストールする必要がある。


apt install build-essential patch ruby-dev zlib1g-dev liblzma-dev

rmagicはImageMagickのRuby bindingだが、システムにImageMagickがインストールされていなければならない。またインスールされているヘッダーファイルやオブジェクトファイルを発見するためにpkg-configも必要だ。

GitHub - rmagick/rmagick: Ruby bindings for ImageMagick

Debian系では以下のように依存パッケージをインストールする


apt install build-essential pkg-config libmagicwand-dev

51 comments:

  1. twitterの方で依存地獄とお嘆きのようですが、コンパイルのためにincludeファイルを仕入れる必要があるとか精々その程度で、本物の地獄ではないのかと。Dependency Hell は、ひとつのライブラリのバージョンなどの不整合が依存関係にあるライブラリに次々と波及していくような状態を表した俗語のようです。まあ、これをソースからのビルドで解決しようなどと(お馬鹿なことを)すると configure を通した瞬間「あれがない」とか「これは古い」とか言い出して、それらすべてを修正しなければならなくなります(=Dependency Hellでの Death March)。特に悲惨なのが、これをクロスでやらなければならない場合で、クロス・コンパイルをあまり意識しないで作られた configure も多く(クロスの実行コードをホストでテスト実行しようとしたり、最後の最後でクロスは拒否するとか言って来たりする)、これらの修正から行わないとならない場合もあります(=本当に地獄)。

    ReplyDelete
  2. Dịch thuật Việt là chuyên trang về các giải pháp biên dịch (công chứng và chuyên ngành), cung cấp nhân lực phiên dịch dự án ngắn và trung hạn
    Ra đời từ 2016, hoạt động trong lĩnh vực dịch thuật và chuyển đổi ngôn ngữ và để đáp ứng nhu cầu tại thị trường Việt Nam cho các tổ chức phi chính phủ, các tập đoàn đa Quốc Gia,và đặc biệt chuyên dịch thuật các dự án hỗ trợ phát triển cho chính phủ Việt Nam Chúng tôi có kinh nghiệm triển khai hỗ trợ dịch thuật phiên dịch các dự án đa ngành như kinh tế, kỹ thuật, tài chính ngân hàng, quản trị kinh doanh…. với trên 50 ngôn ngữ phổ thông khác nhau

    ReplyDelete
  3. Very informative blog! Thanks for sharing the software installation about If nokogiri and rmagick fail with gem install.
    Custom Vape Cartridge Packaging

    ReplyDelete
  4. Custom Boxes World attractive your clients will beg for your merchandise is made by the multiple Boxes. We all know the tendencies of beliefs and styles which have been introduced. Custom Printed Boxes Wholesale

    ReplyDelete
  5. Your blog is very frinedly.I really like if can you write on black mailer boxes.

    ReplyDelete
  6. Finding **Essential Oil Boxes** for essential oils such as vehicle diffusers and oil diffusers online with **Custom Boxes World UK** is simple and with just several ticks.
    Essential Oil Boxes

    ReplyDelete
  7. We provide you with a wide range of excellent customization options that are suitable enough to draw your shoppers' attention to your things like scents, drinks, oils, recipes pressed in their simple jars. Custom 30ml Bottle Packaging Boxes

    ReplyDelete
  8. Custom Double Divider tuck front Boxes are handy to use and can be conveniently stacked. These Tuck Front Boxes help with a variety of abilities due to their adaptable nature. Tuck Front Boxes

    ReplyDelete
  9. Custom Boxes World UK offers an affordable range of designed Bath Bomb Boxes. That will not only make your packaging of bath bomb appealing. But will also convert your custom bath bombs into a style icon. Everyone manufacturer wishes to get appealing custom bath bomb packaging wholesale.

    ReplyDelete
  10. Custom Boxes World UK is providing Essential Oil Boxes at wholesale. So, you can get custom boxes for your essential oil bottle with the best option. Moreover, our team create exclusive looking essential oil boxes as per your requirements.

    ReplyDelete
  11. The point of view of a specific E-Liquid packaging boxesdecides how individuals will prefer the article. There may be some groups that could do without the style, and for them, our liquid and personalized. Custom 60ml Bottle Packaging Boxes will be an interest for the charm that your point of view has.

    ReplyDelete
  12. If you are looking for the ideal method to Essential Oil Boxes and transport your essential oils, you have come to the perfect place. We can suggest a couple of package fixes, depending on how you usually sell your oils, your satisfaction cycle, and your image maintenance estimates.

    ReplyDelete
  13. In case you prefer to give scent boxes to your sweetheart in commemoration of Valentine's Day, in this event, we can personalize these Custom 2 Oz Bottle Boxes as indicated in this theme. You can also print your custom 2 oz clinical container boxes with our quirky and enriching highlights for each particular festival. We offer custom 2 oz membership jar boxes and custom 2 oz container packs with full customization options.

    ReplyDelete
  14. Soap boxes UK offer custom soap boxes of all kind of shapes, style and designs at wholesale rates. So, you can make customize changes and distinguish your brand in the market. Soap Packaging UK

    ReplyDelete
  15. Bottle items and their packaging prerequisites are the need of time. Regardless of whether these are as Custom Dropper Bottle Boxes or some other packaging and pressing, their viability has been endorsed by medical care trained professionals. That is the reason hemp items and Custom 1 Oz Bottle Boxes have been reported legitimate because of their various helpful wellbeing and restorative impacts; individuals worldwide have begun understanding the key significance of these plants.

    ReplyDelete
  16. Packaging is perhaps the most professional printing and custom boxing organization in the UK. We serve our vast and satisfying customer base with the help of our appealing bundle boxes. Eye Drop Boxes

    ReplyDelete
  17. Avail appealing ideas to embellish the outlook of face cosmetics through your unique mirror boxes. Gather your distinct identity by getting high quality packaging boxes made exactly according to your desired demand. Custom Mirror Boxes

    ReplyDelete
  18. Luxury Custom Lip Balm Boxes has a vital part in boosting your business revenue. These containers are accessible in various shades and patterns. Custom Boxes World UK is a packing company that craft packing containers with the durable stuff. Get Wholesale Lip Balm Packaging Boxes in affordable rates. Lip Balm Boxes

    ReplyDelete
  19. Custom 60 ml Bottle Packaging Boxes use to engage customers and build your trustworthiness. Box customization sends a reasonable message: "This deal with our item and customers most meticulously, starting from the package," and could lead to the customer's last purchase. Also, note that a case along with your sizes allows you to guarantee the item and advance in the package store network.

    ReplyDelete
  20. The vape is a cutting edge result of the tobacco business, used for today's cigarettes; the vape business features the number of items used by people worldwide. Vape items incorporate vape juice, e-fluids, and many more things. Vape Vaping Packaging Boxes

    ReplyDelete
  21. Nuggets also fall in the fast food category and are one of the most consumed food items. With ever increasing consumption and competition Custom Nugget boxes offer you the upper hand, a custom style nugget box will act as an advertiser for your business. Nuggets Boxes

    ReplyDelete
  22. Custom Boxes offers the best nature of the 10ml bottle boxes. We are in the first place offering discounts on 10ml plastic shower bottles. Now you can free yourself from the cost of the 10 ml bottle box format here. You can get a discount on 10ml dropper bottles. Custom 10 ml Bottle Boxes

    ReplyDelete
  23. 30ml color boxes are the most valuable and valuable package for retailers to advance their products. These are very helpful and powerful in delivering the cannabidiol product to the customers. It makes the package that focuses on keeping the Custom 30ml Bottle Packaging Boxes quality and adequacy of your essential things in perfect condition.

    ReplyDelete
  24. Finding Essential Oil Boxes for essential oils such as vehicle diffusers and oil diffusers online with **Custom Boxes World UK** is simple and with just several ticks.

    ReplyDelete
  25. Request soap packaging boxes from Soap Packaging. We offer platform printing Soap Packaging UK with free transportation costs in the UK. Custom boxes are the ideal alternative for minor and mass soap producers. Discount Custom Soap Boxes in the UK suggests custom handcrafted packaging with a logo.

    ReplyDelete
  26. The Kraftplatforms industry is perhaps the most eminent enterprise worldwide, with the UK driving with probably the most significant market. The Wholesale Soap Packaging is high on each maker that is glad to have a couple of clients; they purchase hand-crafted platforms from packaging organizations that they like.

    ReplyDelete
  27. Unity Media News is a Premier tech news website with a special focus on breaking news about technology from all over the world. All about the latest in tech news and other inventions will discuss here.

    ReplyDelete
  28. These boxes can be customized entirely, such as their shape and size, unlike standard cardboard that can be customized to be your product's subject matter. When the product of Die-Cut Cardboard Boxes ship by air, shipping container, car, the waste of space wastes. While die-cut boxes fit your product as opposed to a standard box. It reduces the space leftover during shipping. And it also protects against the need for additional packaging.

    ReplyDelete
  29. We provide high-quality digital and offset printing bulk 30 ml bottle boxes to bring all your artwork and images to life for sailing and protecting. Also guiding the traditional products contained within it. We will make custom 30ml Bottle Packaging Boxes to keep your liquid product safe in the best possible way. We can design eye-catching designs on top of these 30 ml dropper boxes that attract more customers and become the center of their attention.

    ReplyDelete
  30. Order soap packaging boxes at Wholesale Soap Packaging Boxes UK. Our custom soap boxes packaging can make a boost to your soap items sales with your branding details. We offer soap box printing UK with free shipping cost in the UK. Wholesale Soap Packaging Boxes UK

    ReplyDelete
  31. These boxes will be perfect for you to pack a variety of products that will give your customer a chance to wow. We provide you with these Truffle Boxes to pack a variety of gifts on your doorstep. As well as providing a beautiful way to pack exclusively sweet gifts. You can get customized all the empty truffle boxes from small to large size using our company. Hire us as a truffle boxes UK Manufacturing Company.

    ReplyDelete
  32. Custom Boxes World UK offers a range of Custom Hair Dryer Boxes wholesale in different shapes and sizes. We use the finest quality material for hairdryer packaging.

    ReplyDelete
  33. Hair Extension has an incredible interest in the market these days given its quality to develop the look of hair quickly. This article is a streamlined and protected restructured boundary request to give people the best quality Hair Extension Packaging they need. We plan and remake delicious pictures in correspondence with the nature of hair augmentation.

    ReplyDelete
  34. Customs four corner boxes are exclusively created for the security of this Four Corner Cake Boxes, cupcake, and distinct bakery materials. These boxes are made in such a manner that it’s integrated support is inserted. And stop from harm.

    ReplyDelete
  35. Eso Sip of Stamina
    Life in lines is a good life ideas for the whole humanity. We are here to serve you with different tips and tricks about technology, home decor, fashion, business, health, entertainment and much more for your batter life style. Our mission is keep you update with latest news and trends in the world.

    ReplyDelete
  36. In the market many garment manufacturer selling cloth products. We are offering you a brilliant garment box as your own design. We can print custom boxes with logo, product image, and company/product information. Shirt Packaging Boxes UK

    ReplyDelete
  37. The Move Me Professional Movers and Packers in Dubai. Contact us today for professional movers in Dubai. Make your move stress-free with The Move Me movers and packers in Dubai, UAE.
    the move me moving and packing service in dubai

    ReplyDelete
  38. One of the most important things that you need to be considered when you are going to purchase a significant number of packaging Gift Boxes Wholesale is wholesale prices.

    ReplyDelete
  39. We never compromise on the quality of the Custom Compact Blush Boxes despite our lowest market rates. Besides, we also provide free design assistance to our clients who need any sort of help or assistance.

    ReplyDelete
  40. We offer the lowest possible Wholesale Cream Butter Boxes prices in comparison to market rates. Moreover, we have no minimum order. We address our customers’ needs in the best possible manner and their satisfaction is our top priority.

    ReplyDelete
  41. We offer custom Eye Shadow Boxes in a wide range of materials, treatments, and embellishments to compliment your brand.

    ReplyDelete
  42. Do you want to protect your Custom 10ml Bottle Boxes from lavishly printed papers? Hit the button order now and have the vast range of themes and templates for your 10ml bottles boxes.

    ReplyDelete
  43. In the same way, we are the best for you who deliver these Gift Boxes Wholesale UK to your doorstep according to your desired size, shape, and color at a reasonable price without reducing your budget.

    ReplyDelete
  44. Our engineers precisely make Custom Lip Balm Boxes Wholesale in any sizes you need. Choose appropriate materials to craft containers in your specified dimensions. Custom printed lip balm boxes wholesale are best in meeting your packing requirements.

    ReplyDelete
  45. While buying Custom Soap Boxes you should consider all the factors that will influence a customer’s purchase. Wholesale soap UK considers all of these factors for you. And engages themselves in creating premium quality wholesale soap packaging.

    ReplyDelete
  46. Our engineers precisely make Lip Balm Boxes Wholesale in any size you need. Choose appropriate materials to craft containers in your specified dimensions. Custom printed Lip Balm Boxes wholesale are best in meeting your packing requirements.

    ReplyDelete
  47. our company delivers Reverse Tuck End Boxes UK all over the world and is known as a reliable company, our company uses graphic materials which are known as eco-friendly materials and the whole world and Protects them from various environmental and thermal changes and protects them from moisture during delivery from one country to another.

    ReplyDelete
  48. Your personal stuffs is beautiful. All the time deal with it up!

    ReplyDelete
  49. You make it enjoyable and you continue to care for to keep it smart.

    ReplyDelete
  50. I cant wait to learn much more from you. This is actually a great site.

    ReplyDelete
  51. It's a very helpful section of information. We're happy that you discussed this

    ReplyDelete

You can use some HTML elements, such as <b>, <i>, <a>, also, some characters need to be entity referenced such as <, > and & Your comment may need to be confirmed by blog author. Your comment will be published under GFDL 1.3 or later license with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.