2010-05-14 2 views
5

얼랑가 이미 설치되었습니다Ubuntu Karmic에 LFE를 어떻게 설치합니까?

내가 github의에서 LFE를 다운로드 0.5.2을 체크 아웃
$ erl 
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] 

Eshell V5.7.4 (abort with ^G) 
1> 

:

git clone http://github.com/rvirding/lfe.git 
cd lfe 
git checkout -b local0.5.2 e207eb2cad 

$ configure 
configure: command not found 

$ make 
mkdir -p ebin 
erlc -I include -o ebin -W0 -Ddebug +debug_info src/*.erl 
#erl -I -pa ebin -noshell -eval -noshell -run edoc file src/leex.erl -run init stop 
#erl -I -pa ebin -noshell -eval -noshell -run edoc_run application "'Leex'" '"."' '[no_packages]' 
#mv src/*.html doc/ 

뭔가 바보 같은 내가이어야합니다

$dpkg -l|grep erlang 
ii erlang       1:13.b.3-dfsg-2ubuntu2   Concurrent, real-time, distributed function 
ii erlang-appmon     1:13.b.3-dfsg-2ubuntu2   Erlang/OTP application monitor 
ii erlang-asn1      1:13.b.3-dfsg-2ubuntu2   Erlang/OTP modules for ASN.1 support 
ii erlang-base      1:13.b.3-dfsg-2ubuntu2   Erlang/OTP virtual machine and base applica 
ii erlang-common-test    1:13.b.3-dfsg-2ubuntu2   Erlang/OTP application for automated testin 
ii erlang-debugger     1:13.b.3-dfsg-2ubuntu2   Erlang/OTP application for debugging and te 
ii erlang-dev      1:13.b.3-dfsg-2ubuntu2   Erlang/OTP development libraries and header 
[... many more] 

얼랑가 작동하는 것 같다 누락 된 : o

$ sudo make install 
make: *** No rule to make target `install'. Stop. 

$ erl -noshell -noinput -s lfe_boot start 
{"init terminating in do_boot",{undef,[{lfe_boot,start,[]},{init,start_it,1},{init,start_em,1}]}} 

Crash dump was written to: erl_crash.dump 
init terminating in do_boot() 

안녕하세요 세계 소스 파일을 만들고 컴파일하고 실행하는 방법에 대한 예가 있습니까?

답변

7

아니요, 누락 된 것이 없습니다. LFE의 Makefile은 이고 "보다 작음"이므로 무시해야하며 다음 릴리스에서 개선 될 예정입니다. 모든 필요한 파일을 보상하기 위해 이미 컴파일되어 있고 .beam 파일은 ebin 디렉토리에 있습니다. OTP의 일부가 아니기 때문에 거기에 설치해야한다고 생각하지 않습니다.

개인용 erlang 라이브러리 디렉토리를 만들고 환경 변수 ERL_LIBS를 가리 키도록 가장 쉬운 방법. 그런 다음 전체 LFE 디렉토리를 삭제하십시오. erlang이 시작되면 코드 서버가 자동으로 lfe/ebin 디렉토리를 경로에 추가하고 .beam 파일이 자동으로 찾아로드됩니다. 이것은 ebin 디렉토리가있는 패키지에서 작동합니다. 이것은 Windows에서도 작동합니다. 그래서 : 당신은 당신이 다음 (/Users/rv/erlang/lib/lfe/ebin을 볼 수 얼랑 시작하면

  1. export ERL_LIBS=~/erlang/lib
  2. 이 전체 LFE 디렉토리

을 넣어, 환경 변수 ERL_LIBS 설정 ~/erlang/lib

  • 을 libs와 디렉토리를 확인 말한다 또는 어디에 있든 코드 경로 (code:get_path())에 저장하십시오. 당신은 또한 lfe이 미래에뿐만 아니라 포함 않는 lfe.bat이있을 것입니다

    erl -noshell -noinput -s lfe_boot start 
    

    와 직접 LFE 쉘을 시작 할 수있을 것입니다.

    erlang에서와 마찬가지로 모든 텍스트 편집기가 LFE를 편집 할 수 있습니다. 이맥스에는 여전히 기본이지만 작동하는 LFE 모드가 있습니다. 아직 창에서 LFE를 실행할 수 없습니다. 곧. 이를 포함하는 가장 좋은 방법은 이맥스 파일에 다음을 넣어하는 것입니다

    lfe/examples에서 일부 예제 파일이 있습니다
    ;; LFE mode. 
    (setq load-path (cons "/Users/rv/erlang/lib/lfe/emacs" load-path)) 
    (require 'lfe-start) 
    

    , 모든 작동합니다. lfe/test/visual에는 예제 파일로 포함 된 테스트 파일이 많이 있습니다.

    (c '"foo")    ;This will autoload 
    

    이 매우 정확 lfe/docs에서 문서의 무리가 있지만 user_guide.txt 필요로 다음 LFE 쉘에서 수행하는 동안

    lfe_comp:file("foo"). 
    l(foo).     %No autloload here, do this to ensure loading 
    

    을 일반 얼랑 쉘에서 LFE 파일을 컴파일하려면 펼친.몇 가지 흥미로운 토론을 포함하고 사람들이 GitHub의 LFE 위키에 꽤 많이 쓴

    http://groups.google.se/group/lisp-flavoured-erlang 
    

    에서 LFE위한 구글 그룹도 있습니다.

    그게 전부라고 생각합니다. 더 궁금한 점이 있으시면 저에게 연락하십시오.

  • +0

    나를 안내해 주셔서 감사합니다. - karlthorwald - 일명 – user89021

    관련 문제