{"id":4262,"date":"2018-02-14T13:37:22","date_gmt":"2018-02-14T04:37:22","guid":{"rendered":"https:\/\/www.pistolfly.com\/weblog\/?p=4262"},"modified":"2018-02-20T14:23:25","modified_gmt":"2018-02-20T05:23:25","slug":"installing-ruby-2-5-0-on-centos6","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html","title":{"rendered":"Installing Ruby-2.5.0 on CentOS6"},"content":{"rendered":"<p>Attempting to install Ruby-2.5.0 from the source on CentOS6 causes an error in `make` and it can not be installed.<br \/>\nIt is an error because gcc on CentOS6 is old.<\/p>\n<pre class=\"command-line\">$ .\/configure --prefix=\/opt\/ruby-2.5.0 --disable-install-doc\r\n$ make\r\n...(\u7565)\r\nprelude.c: In function \u2018prelude_eval\u2019:\r\nprelude.c:204: error: #pragma GCC diagnostic not allowed inside functions\r\nprelude.c:205: error: #pragma GCC diagnostic not allowed inside functions\r\nprelude.c:221: error: #pragma GCC diagnostic not allowed inside functions\r\n\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb:\r\ncc1: \u8b66\u544a: unrecognized command line option \"-Wno-self-assign\"\r\ncc1: \u8b66\u544a: unrecognized command line option \"-Wno-constant-logical-operand\"\r\ncc1: \u8b66\u544a: unrecognized command line option \"-Wno-parentheses-equality\"\r\ncc1: \u8b66\u544a: unrecognized command line option \"-Wno-tautological-compare\"\r\nmake: *** [prelude.o] \u30a8\u30e9\u30fc 1\r\n<\/pre>\n<p><a href=\"https:\/\/bugs.ruby-lang.org\/issues\/14234\" target=\"_blank\" rel=\"noopener\">Bug #14234: Failed to build on CentOS 6.9 - Ruby trunk - Ruby Issue Tracking System<\/a><\/p>\n<p>It will be fixed on the next release (Ruby-2.5.1), but you can install Ruby-2.5.0 using scl's devtoolset for the time being.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2017\/01\/installing-scl-devtoolset-on-centos6.html\">Installing scl devtoolset on CentOS6<\/a><\/p>\n<p>Create under \/etc\/profile.d with the following content\uff08example for devtoolset-4 collection\uff09and enable scl's devtoolset for users after reboot. So you can install Passenger by `passenger-install-apache2-module` or install gems which need native build with Capistrano.<\/p>\n<pre class=\"command-line\">$ cat \/etc\/profile.d\/enabledevtoolset-4.sh\r\n#!\/bin\/bash\r\nsource scl_source enable devtoolset-4<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Attempting to install Ruby-2.5.0 from the source on CentOS6 causes an error in `make` and it can not be instal &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing Ruby-2.5.0 on CentOS6<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"4254","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[27],"tags":[],"class_list":["post-4262","post","type-post","status-publish","format-standard","hentry","category-ruby","en-US"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Installing Ruby-2.5.0 on CentOS6 - Pistolfly<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Ruby-2.5.0 on CentOS6 - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"Attempting to install Ruby-2.5.0 from the source on CentOS6 causes an error in `make` and it can not be instal &hellip; Continue reading Installing Ruby-2.5.0 on CentOS6 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-14T04:37:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-20T05:23:25+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"Installing Ruby-2.5.0 on CentOS6\",\"datePublished\":\"2018-02-14T04:37:22+00:00\",\"dateModified\":\"2018-02-20T05:23:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html\"},\"wordCount\":114,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"Ruby\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html\",\"name\":\"Installing Ruby-2.5.0 on CentOS6 - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2018-02-14T04:37:22+00:00\",\"dateModified\":\"2018-02-20T05:23:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2018\\\/02\\\/installing-ruby-2-5-0-on-centos6.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Ruby-2.5.0 on CentOS6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing Ruby-2.5.0 on CentOS6 - Pistolfly","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html","og_locale":"en_US","og_type":"article","og_title":"Installing Ruby-2.5.0 on CentOS6 - Pistolfly","og_description":"Attempting to install Ruby-2.5.0 from the source on CentOS6 causes an error in `make` and it can not be instal &hellip; Continue reading Installing Ruby-2.5.0 on CentOS6 &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html","og_site_name":"Pistolfly","article_published_time":"2018-02-14T04:37:22+00:00","article_modified_time":"2018-02-20T05:23:25+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pistolfly","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"Installing Ruby-2.5.0 on CentOS6","datePublished":"2018-02-14T04:37:22+00:00","dateModified":"2018-02-20T05:23:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html"},"wordCount":114,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["Ruby"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html","url":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html","name":"Installing Ruby-2.5.0 on CentOS6 - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2018-02-14T04:37:22+00:00","dateModified":"2018-02-20T05:23:25+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2018\/02\/installing-ruby-2-5-0-on-centos6.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"Installing Ruby-2.5.0 on CentOS6"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-16K","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=4262"}],"version-history":[{"count":13,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4262\/revisions"}],"predecessor-version":[{"id":4269,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4262\/revisions\/4269"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=4262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=4262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=4262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}