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

50 comments:

Anonymous said...

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

Công ty CP dịch thuật miền trung - MIDtrans said...

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

Jatin Sethi said...

yespornplease
yespornplease
yespornplease

Robin Adam said...

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

Custom Boxes World USA said...

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

Aeryn Watts said...

Searching for Custom Printed 15ml Bottle Packaging Boxes to enrich your product appearance We offer low MOQ end to end solutions from design to shipping.
15ml dropper boxes

Hickson Starc said...

Great job! Your article is so informative. I really like it.
please read this
Custom Boxes Wholesale

Custom Boxes World USA said...

Cosmetic organizations create excellence arrangements of uniquely shaped custom bath bomb boxes. We give you’re possess made to display your image subject lineup. bath bomb boxes

Custom Boxes World USA said...

Custom Boxes World is among the printing and boxes Supplier Company from the USA. We have served our clientele using our boxes that were created attractive. Essential Oil Boxes

Custom Boxes World USA said...

Custom Boxes World would be the soap packaging makers offering customized soap packaging. It satisfies your branding advertising and packaging demands. Wholesale Soap Packaging Boxes

georgedaltone said...

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

Custom Boxes World UK said...

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. Custom 30ml Bottle Packaging Boxes

Custom Boxes World UK said...

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

ramonavada said...

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

ramonavada said...

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

ramonavada said...

Custom Boxes World UK is the other boxes packaging company of a conveying handle. These cases are generally utilized for the bundling of gift things and other helpful items.
Gable Bag Packaging Boxes

ramonavada said...

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.

ramonavada said...

Exceptionally Printed 60ml Bottle Boxes Experience the most expert customer support and get the best Custom 60ml Bottle Packaging Boxes because The custom boxes world Uk is the only organization that allows you to have premium printing manufactured packaging boxes class at an entirely moderate cost. Select the best quality material to fill your Custom 60ml Bottle Packaging BoxesLinks to an external site. significantly by assembling your boxes from scratch to suit your every interest with The Boxes.

ramonavada said...

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.

ramonavada said...

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.

ramonavada said...

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.

ramonavada said...

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.

ramonavada said...

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

ramonavada said...

We offering top quality custom printed boxes with easy and fast packaging process end-to-end online packaging solutions. Custom Boxes UK

ramonavada said...

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.

ramonavada said...

Are you looking for unique methods to successfully sell your eye drops? Stress no more, our bespoke Eye Drop Boxes are an ideal trading method in your clinical stores. They are given at your average cost and have each of the highlights to commit eye drops safely. What's more, Eye Drop Boxes gives its customers value for their time and cash.

ramonavada said...

Foldable boxes are utilized for safeguarding Hair Extensions in superb condition; that is the explanation these kinds of boxes are of tremendous interest. Off-load the old packaging Foldable Hair Extension Boxes and use the creative Foldable Hair Extension Boxes.

ramonavada said...

That offers state-of-the-art folding boxes to its esteemed customers at discounted rates with selective and practical quality. Folding Packaging Boxes are manufactured using innovation and first-class appliances and are known for their robustness and similarity.

ramonavada said...

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

ramonavada said...

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

ramonavada said...

E-cigarette boxes request appropriate assurance of the item the cases they are stuffed in. These containers should have a spellbinding viewpoint that allures clients to get their thing regardless of whether they needn't bother with it. It tends to finishes by planning appealing shapes that are powerful similar to E-Cigarette Packaging Boxes with perplexing plans; window cut boxes with splendid tones, and striking typography that features the fundamental data about the item. Shapes, sizes, and illustrations aggregately make packaging appealing. Cardboard utilize to makes these cases.

ramonavada said...

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

ramonavada said...

Bath Bomb Packaging Boxes is the key element that can accelerate the product's movement by making it unique. There are several themes from simple to chic and contemporary to classic, and design companies use them to create an excellent packaging design for their products which can win the competition. A perfect theme, color balance and symmetry, precise and descriptive details, simplicity and focal points are the main ingredients of a box design which should be kept in mind to create a great design.

ramonavada said...

Custom Bakery Packaging Boxes like cake boxes, cupcake boxes, individual cake gift boxes are used to present your bakery products in a unique way. You get FREE design and quick shipping (free) shipping for your bakery products.

ramonavada said...

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.

ramonavada said...

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

ramonavada said...

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

ramonavada said...

Soaps come in various shapes, grades, and plans. Organizations are attacked to make an extraordinary place of their lurking soap. Customers will evaluate the nature of their Soap Packaging UK depending on its Packaging. The gorgeous custom platforms will give your buyers some spin. Put your pallet aside from your tough marks with the use of custom-packed Kraft soapboxes.

ramonavada said...

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

ramonavada said...

Bottleneck labels, bottleneck hangers have become a popular point of purchase for winemakers and manufacturers of other products sold in bottles, such as food, hygiene, and health products. These bottles are ideal for promoting coupons and recipes. Or inspirational messages for your clients. Bottle Neckers Tags are a quick call to action the moment a bottle is sold.

ramonavada said...

The customer usually loves the printing of the folding end box, as they are simpler to open or close Reverse Tuck End Boxes UK from anywhere since they perform with the upper parts on both sides of the cases.

ramonavada said...

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.

ramonavada said...

The main thing that catches the customer's attention is how an item has been planned and Custom Boxes. These make great vape boxes to help our customers support promotion efforts. Vape Vaping Packaging Boxes

ramonavada said...

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.

ramonavada said...

Your lipstick case and plan are essential as you can mention to your customers what your lipstick looks like and what you want to do, enjoy, and be the trusted brand. It is a vital specialized instrument. For your customers to quickly want to hide that fantastic Custom Lipstick Boxes and never try another brand, choose a package that speaks and sells for itself. Regardless of how excellent or moderate, your plan is, our state-of-the-art printers, materials, and fantastic customer support are the ideal elements of an expert-looking lipstick box.

ramonavada said...

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.

ramonavada said...

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.

ramonavada said...

In case you are looking for an organization where you can rely on people with visual disabilities to obtain solid and adjusted discount bottles boxes to wrap your simple jars, then you are in the perfect place. This is a renowned organization and the most prominent name among the leading organizations of the UK. Custom 10 ml Bottle Boxes

ramonavada said...

Bath bomb items need durable materials that can get them far from dampness. These things need to remain in a Bath Bomb Wholesalers UK that will make them keep going for quite a while. You can pick some other exceptional plans for your containers.

ramonavada said...

There are many discount platforms that manufacturers are selling cleaning supplies in custom-printed soapboxes. It is the best approach to advance, display and ship the Wholesale Soap Packaging Boxes to the end customers. In the expectation of encompassing your business in the severe market, it is essential to promote it with a logo-stamped package.