elixirhandson201906's Introduction
elixirhandson201906's People
elixirhandson201906's Issues
WSL(Ubuntu 18.04.1 LTS)にてモニタリングツールが起動できない
環境
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
問題
WSLのUbuntu環境にて、モニタリングツールを実行時にエラーが起きた
$ iex
Erlang/OTP 22 [erts-10.4.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Interactive Elixir (1.8.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start
** (UndefinedFunctionError) function :observer.start/0 is undefined (module :observer is not available)
:observer.start()
$ sudo apt-get install -y erlang-observer
実行後、もう一度試したら次のようなエラーが起きた
iex(1)> :observer.start
00:28:52: Error: Unable to initialize GTK+, is DISPLAY set properly?
{:error,
{{:einval, 'Could not initiate graphics'},
[
{:wxe_server, :start, 1, [file: 'wxe_server.erl', line: 65]},
{:wx, :new, 1, [file: 'wx.erl', line: 115]},
{:observer_wx, :init, 1, [file: 'observer_wx.erl', line: 107]},
{:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 372]},
{:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}
]}}
解決
Windows上でVcXsrv Windows X Serverをインストール
https://sourceforge.net/projects/vcxsrv/
VcXsrvを起動
https://www.atmarkit.co.jp/ait/articles/1812/06/news040.html
WSL上で以下のコマンドを実行
$ echo ‘export DISPLAY=:0.0’ >> .profile
$ source .profile
改めてiexからコマンドを実行
$ iex
Erlang/OTP 22 [erts-10.4.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Interactive Elixir (1.8.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start
:ok
iex(2)>
うまく起動できました
参考サイト
https://www.walknsqualk.com/post/elixir-on-wsl/
https://www.atmarkit.co.jp/ait/articles/1812/06/news040.html
https://torisky.com/wsl%E3%81%A7%E3%82%A8%E3%83%A9%E3%83%BC%EF%BC%9Aerror-cant-open-display%E3%81%AE%E5%AF%BE%E5%87%A6/
WSL(Ubuntu 18.04.1 LTS)にてライブラリのインストールができない
環境
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
問題
WSLのUbuntu環境にて、ライブラリを組み込む際に以下のようなエラーが出た
$ mix deps.get
23:33:01.754 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: '/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/erlang/lib/crypto-4.5.1/priv/lib/crypto.so)'"
OpenSSL might not be installed on this system.
23:33:01.884 [warn] The on_load function for module crypto returned:
{:error, {:load_failed, 'Failed to load NIF library: \'/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1\' not found (required by /usr/lib/erlang/lib/crypto-4.5.1/priv/lib/crypto.so)\''}}
** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:eoptions, {:undef, [{:crypto, :supports, [], []}, {:tls_record, :supported_protocol_versions, 1, [file: 'tls_record.erl', line: 658]}, {:tls_record, :supported_protocol_versions, 0, [file: 'tls_record.erl', line: 344]}, {:ssl, :handle_options, 3, [file: 'ssl.erl', line: 1504]}, {:ssl, :connect, 4, [file: 'ssl.erl', line: 522]}, {:http_transport, :connect, 4, [file: 'http_transport.erl', line: 109]}, {:httpc_handler, :connect, 4, [file: 'httpc_handler.erl', line: 786]}, {:httpc_handler, :connect_and_send_first_request, 3, [file: 'httpc_handler.erl', line: 812]}]}}}]}
Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.
解決
以下のコマンドを実行
sudo apt-get install aptitude
sudo aptitude install erlang-crypto
erlang-crypto
のインストール中画面が変わって色々聞かれるが、OK→Yes
改めてmix deps.get
をする
Hexをインストールしていない場合、Hexをインストールするか?と聞かれるのでYでインストール
$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
New:
poison 4.0.1
* Getting poison (Hex package)
これで解決しました!
参考サイト
https://elixirforum.com/t/problems-with-elixir-erlang-crypto-module-on-ubuntu-arm/13846/2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.