{"id":5220,"date":"2016-02-08T10:41:38","date_gmt":"2016-02-08T01:41:38","guid":{"rendered":"http:\/\/yonezo.biz\/?p=5220"},"modified":"2016-02-08T10:41:38","modified_gmt":"2016-02-08T01:41:38","slug":"ubuntu7%e3%81%b8ocaml%e3%83%a2%e3%83%ad%e3%83%a2%e3%83%ad%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/yonezo.biz\/?p=5220","title":{"rendered":"Ubuntu7\u3078OCaml\u30e2\u30ed\u30e2\u30ed\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u4ee5\u4e0broot\u3067\u3002<\/p>\n<pre class=\"brush: bash;\">apt-get install ocaml\r\napt-get install opam\r\n<\/pre>\n<p>\u9014\u4e2d\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u3002\u300cy\u300d\u3067\u5fdc\u7b54\u3002<\/p>\n<pre class=\"brush: bash;\">Do you want OPAM to modify ~\/.bashrc and ~\/.ocamlinit?\r\n(default is 'no', use 'f' to name a file other than ~\/.bashrc)\r\n[N\/y\/f] y\r\n<\/pre>\n<p>\u305d\u3082\u305d\u3082\u3001<\/p>\n<pre class=\"brush: bash;\">apt-get install opam -y\r\n<\/pre>\n<p>\u3067\u3059\u304b\u306d\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u3001\u5f15\u304d\u7d9a\u3044\u3066\u3002<\/p>\n<pre class=\"brush: bash;\">opam init\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u6b21\u306bopam\u304b\u3089OCaml\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"brush: bash;\">opam list\r\n<\/pre>\n<p>\u3067OCaml\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3002<\/p>\n<pre class=\"brush: bash;\">opam switch 4.02.3\r\n<\/pre>\n<p>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u3001\u5fc5\u305a\u3002<\/p>\n<pre class=\"brush: bash;\">eval `opam config env`\r\n<\/pre>\n<p>\u3053\u308c\u3001\u306a\u3093\u304b\u9762\u5012\u3060\u3068\u601d\u3046\u306e\u306f\u79c1\u3060\u3051\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>OCaml\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308beliom\u3092\u4f7f\u3044\u305f\u3044\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<p>\u4ed8\u968f\u3059\u308bocsigenserver\u306a\u3069\u4ed6\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3082\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash;\">opam install eliom\r\n<\/pre>\n<p>\u3068\u3001\u3053\u3053\u3067\u30a8\u30e9\u30fc\u304c\u3002<\/p>\n<pre class=\"brush: bash;\">=-=- ocamlfind.1.5.6 troubleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r\n=&gt; Could not build ocamlfind. The most common reason for that is a missing 'm4' system package.\r\n<\/pre>\n<p>m4\u304c\u5165\u3063\u3066\u306a\u3044\u3063\u3066\u4e8b\uff01\uff1f<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u3084\u3063\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: bash;\">apt-get install m4\r\n<\/pre>\n<p>\u518d\u5ea6<\/p>\n<pre class=\"brush: bash;\">opam install eliom\r\n<\/pre>\n<p>\u3068\u3059\u308b\u3082\u3001\u30a8\u30e9\u30fc\u3002<\/p>\n<pre class=\"brush: bash;\">#=== ERROR while installing conf-pkg-config.1.0 ===============================#\r\nInternal error:\r\n\"pkg-config\": command not found.\r\n\r\n#=== ERROR while installing dbm.1.0 ===========================================#\r\n# opam-version 1.2.0\r\n# os\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 linux\r\n# command\u00a0\u00a0\u00a0\u00a0\u00a0 .\/configure\r\n# path\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/root\/.opam\/4.02.3\/build\/dbm.1.0\r\n# compiler\u00a0\u00a0\u00a0\u00a0 4.02.3\r\n# exit-code\u00a0\u00a0\u00a0 2\r\n# env-file\u00a0\u00a0\u00a0\u00a0 \/root\/.opam\/4.02.3\/build\/dbm.1.0\/dbm-913-fbcac7.env\r\n# stdout-file\u00a0 \/root\/.opam\/4.02.3\/build\/dbm.1.0\/dbm-913-fbcac7.out\r\n# stderr-file\u00a0 \/root\/.opam\/4.02.3\/build\/dbm.1.0\/dbm-913-fbcac7.err\r\n### stdout ###\r\n# Configuring for OCaml version 4.02.3\r\n#\r\n# NDBM not found, the \"camldbm\" library cannot be built.\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001<\/p>\n<pre class=\"brush: bash;\">apt-get install pkg-config\r\n<\/pre>\n<p>\u3068\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: bash;\">apt-get install libpcre3-dev -y\r\n\r\nsudo apt-get install camlp4-extra\r\n<\/pre>\n<p>\u518d\u5ea6<\/p>\n<pre class=\"brush: bash;\">opam install eliom\r\n<\/pre>\n<p>\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082Ubuntu\u3092\u5165\u308c\u305f\u5f8c\u306e\u4f5c\u6cd5\u304c\u8db3\u308a\u306a\u304b\u3063\u305f\u306e\u304b\u306a\u3002<\/p>\n<pre class=\"brush: bash;\">sudo aptitude update\r\nsudo aptitude safe-upgrade\r\n<\/pre>\n<p>\u3053\u306e\u8fba\u3092\u884c\u3063\u3066\u304b\u3089\u306e\u65b9\u304c\u826f\u3044\u306e\u304b\u3082\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u3053\u304b\u3089\u306f\u3001\u4ee5\u524d\u306b\u66f8\u3044\u305f\u901a\u308a\u3002<\/p>\n<pre class=\"brush: bash;\">eliom-distillery -name hello\r\ncd hello\r\nmake test.byte\r\n<\/pre>\n<p>\u3068\u3001\u3059\u308b\u304c\u30a8\u30e9\u30fc\u3002<\/p>\n<pre class=\"brush: bash;\">vagrant@vagrant:~\/develop\/hello$ make test.byte\r\njs_of_eliom -ppx -c -package lwt.ppx -package js_of_ocaml.deriving.ppx -package js_of_ocaml.ppx\u00a0 hello.eliom\r\nFatal error: exception Fl_package_base.No_such_package(\"lwt.ppx\", \"\")\r\nMakefile:206: recipe for target '_client\/hello.cmo' failed\r\nmake: *** [_client\/hello.cmo] Error 2\r\n<\/pre>\n<p>OCaml\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u53e4\u3044\u306e\u304b\u306a\u3068\u601d\u3063\u3066<\/p>\n<pre class=\"brush: bash;\">opam switch 4.02.3\r\n<\/pre>\n<p>\u3068\u3057\u3066\u307f\u308b\u3082\u3001\u30a8\u30e9\u30fc\u3002<\/p>\n<pre class=\"brush: bash;\">vagrant@vagrant:~\/develop\/hello$ make\r\nMakefile:216: .depend: No such file or directory\r\nmkdir _deps\r\neliomdep -server -ppx -package lwt.ppx -package js_of_ocaml.deriving.ppx hello.eliom &gt; _deps\/hello.eliom.server\r\nFatal error: exception Fl_package_base.No_such_package(\"js_of_ocaml.deriving.ppx\", \"\")\r\nMakefile:222: recipe for target '_deps\/hello.eliom.server' failed\r\nmake: *** [_deps\/hello.eliom.server] Error 2\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u73fe\u5728\u306e\u79c1\u306e\u30ec\u30d9\u30eb\u3067\u306f\u3001\u3053\u306e\u30a8\u30e9\u30fc\u306e\u89e3\u8aad\u304c\u4e0d\u53ef\u80fd\u2026\u3002<\/p>\n<p>\u306a\u3093\u304b.ppx\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3093\u3061\u3083\u3089\u3068\u306e\u4e8b\u306e\u3088\u3046\u3060\u304c\u3001\u300c.ppx\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u7121\u3044\u3088\u300d\u306a\u306e\u304b\u300c.ppx\u3058\u3083\u306a\u3044\u3088\u300d\u306a\u306e\u304b\u3082\u5206\u304b\u3089\u305a\u3002<\/p>\n<p>\u300c.depend\u300d\u3063\u3066\u306e\u304cinclude\u3067\u304d\u306a\u3044\u3068\u8a00\u308f\u308c\u3066\u3044\u308b\u3088\u3046\u3060\u304c\u3001\u3072\u3087\u3063\u3068\u3057\u3066\u300c_deps\u300d\u306e\u4e8b\u304b\u306a\u3041\u2026\u3002\u3064\u304b\u300c.depend\u300d\u304c\u7121\u3044\u3063\u3066\u306e\u306b\u300c_deps\u300d\u3092mkdir\u3057\u3066\u308b\u3068\u3044\u3046\u306e\u304c\u3001\u3053\u308c\u3067\u5408\u3063\u3066\u308b\u306e\u304b\u9593\u9055\u3063\u3066\u308b\u306e\u304b\u2026\u3002<\/p>\n<p>\u3067\u3001\u3053\u308c\u3002<\/p>\n<p>make test.byte\u3092\u5b9f\u884c\u3059\u308b\u5ea6\u306b\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u304c\u5909\u308f\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u6bce\u56de\u3001\u5fc5\u8981\u306a\uff1f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u3067\u3001\u3067\u3082\u4e00\u62ec\u3067\u4f5c\u6210\u3055\u308c\u308b\u308f\u3051\u3058\u3083\u306a\u3044\u307f\u305f\u3044\u3067\u3001\u90fd\u5ea6\u4f5c\u6210\u3057\u3066\u308b\u611f\u3058\u3002<\/p>\n<p>\u305f\u3060\u30013\u56de\u307b\u3069\u7e70\u308a\u8fd4\u3057\u305f\u6240\u3067\u3001<\/p>\n<pre class=\"brush: bash;\">\r\njs_of_eliom -ppx -c -package lwt.ppx -package js_of_ocaml.deriving.ppx -package js_of_ocaml.ppx\u00a0 hello.eliom\r\nFatal error: exception Fl_package_base.No_such_package(\"js_of_ocaml.deriving.ppx\", \"\")\r\nMakefile:206: recipe for target '_client\/hello.cmo' failed\r\nmake: *** [_client\/hello.cmo] Error 2\r\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3001_client\u306e\u4e0b\u306ehello.cmo\u304c\u7121\u3044\u3063\u3066\u611f\u3058\u306b\u843d\u3061\u7740\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3068\u3044\u3046\u4e8b\u3067\u3001\u4eca\u56de\u306f\u4e00\u6669\u5bdd\u3066\u3082\u30b5\u30c3\u30d1\u30ea\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u306e\u8fba\u3067\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0broot\u3067\u3002 apt-get install ocaml apt-get install opam \u9014\u4e2d\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u3002\u300cy\u300d\u3067\u5fdc\u7b54\u3002 Do you want OPAM to modify ~\/.bas &hellip; <a href=\"https:\/\/yonezo.biz\/?p=5220\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-5220","post","type-post","status-publish","format-standard","hentry","category-3"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5220"}],"version-history":[{"count":5,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5220\/revisions"}],"predecessor-version":[{"id":5228,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5220\/revisions\/5228"}],"wp:attachment":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}