2013-04-19 3 views
0

Mac에서 elaphe를 설정하려고합니다. 터미널을 사용하여 바코드를 생성하려고하면 python + /.../file.py 명령으로 elaphe가 올바르게 작동하고 올바르게 바코드가 생성됩니다. 하지만 웹 (PHP)을 통해 실행하려고 할 때 아파치의 에러 로그에 다음과 같은 오류가 발생합니다 :Mac에서 GhostScript로 Elaphe를 사용하는 중 오류가 발생했습니다.

Traceback (most recent call last): 
    File "lib/barcode_generator/generator.py", line 19, in <module> 
    code_39_image.save(str(random)+'.tif') 
    File "/Users/x/Library/Python/2.7/lib/python/site-packages/PIL/Image.py", line 1406, in save 
    self.load() 
    File "/Users/x/Library/Python/2.7/lib/python/site-packages/PIL/EpsImagePlugin.py", line 283, in load 
    self.im = Ghostscript(self.tile, self.size, self.fp) 
    **File "/Users/x/Library/Python/2.7/lib/python/site-packages/PIL/EpsImagePlugin.py", line 72, in Ghostscript 
    gs.write(s)** 

내가 윈도우에 있다면 나는 그것이 경로와 프로그램 수에 문제가 말할 것 이 같은인지 '가 t는 "gs.write"를 찾을 맥에서 내가 신인 해요, 나도 몰라, 그럼에도 불구하고 나는 이미 2 경로를 포함했습니다

export PATH=/Users/x/Library/Python/2.7/bin:$PATH 
export PATH=/usr/local/bin:$PATH 
내가 줄 수있는 감사하겠습니다

이 오류와 관련된 몇 가지 아이디어. 미리 감사드립니다.

답변

0

심볼릭 링크를 통해 수정되었습니다. 분명히 PATH 문제이거나 gs 바이너리에 대한 하드 코드 된 참조였습니다.

sudo ln -s/usr/local/bin/gs/usr/bin/gs