2016-06-12 3 views
0

Ubuntu 14.4를 사용하는 Amazon EC2 인스턴스가 있습니다.Ubuntu에 Laravel/Lumen을 설치하는 중

전 세계에 composer을 설치했습니다.

[email protected]:/var/www/html$ composer global require "laravel/lumen-installer" 
Changed current directory to /home/ubuntu/.config/composer 
Using version ^1.0 for laravel/lumen-installer 
./composer.json has been updated 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
    - Installing symfony/process (v3.1.0) 
    Loading from cache 

    - Installing symfony/polyfill-mbstring (v1.2.0) 
    Loading from cache 

    - Installing symfony/console (v3.1.0) 
    Loading from cache 

    - Installing guzzlehttp/promises (1.2.0) 
    Loading from cache 

    - Installing psr/http-message (1.0) 
    Loading from cache 

    - Installing guzzlehttp/psr7 (1.3.0) 
    Loading from cache 

    - Installing guzzlehttp/guzzle (6.2.0) 
    Loading from cache 

    - Installing laravel/lumen-installer (v1.0.2) 
    Loading from cache 

symfony/console suggests installing symfony/event-dispatcher() 
symfony/console suggests installing psr/log (For using the console logger) 
Writing lock file 
Generating autoload files 
[email protected]:/var/www/html$ 

을하지만 lumen 또는 lumen new blog를 입력 할 때 나는 lumen: command not found가 나타납니다 다 잘 보인다 - 나는 루멘를 설치하면

나는이 결과를 얻는다. 다른 질문을 바탕으로

, 나는이에 simillarly는 PATH에 루멘을 추가해야 가정

export PATH="~/.composer/vendor/bin:$PATH" 

이 차이를하지 않습니다 - lumen: command not found 여전히 새 블로그 루멘 실행 한 후 표시됩니다.

누구나이 오류가 발생 했습니까?

+1

대신 위의 내보내기 PATH = "$ PATH : ~/.composer/vendor/bin" – error2007s

+0

을 사용하십시오. 대단히 감사합니다 :) 왜이 일했는지 설명해 줄 수 있습니까? 리눅스를 배우려고하는 임 - 만약 당신이 대답으로 그것을 추가, 나는 대답을 수락합니다 –

답변

2

PATH을 설정 해제하면 문제가 해결되지 않고, 필요한 시스템 디렉토리가 포함 된 PATH가 없어도 문제가 해결됩니다. 자신의 PATH를 설정할 때, 대부분의 경우 이전 PATH 변수에 새 항목을 추가하고 완전히 바꾸지는 않을 것입니다.

이 명령을 사용 변수가 기존 $의 PATH로 시작하도록 설정되어

export PATH="$PATH:~/.composer/vendor/bin" 

알 수 있습니다. 이렇게하면 PATH에 원래의 시스템 디렉토리가 모두 남아있게되며 결국 추가됩니다. lumen은 실행하려고하는 바이너리의 이름이기 때문에, PATH에는 바이너리 자체가 아니라 바이너리를 포함하는 디렉토리 만 포함시켜야합니다.

관련 문제