作者 主題: [問題]請教有關perl 產生MakeFile錯誤  (閱讀 3157 次)

0 會員 與 1 訪客 正在閱讀本文。

AnsonShen

  • 懷疑的國中生
  • **
  • 文章數: 59
    • 檢視個人資料
[問題]請教有關perl 產生MakeFile錯誤
« 於: 2004-02-18 09:42 »
請教各位前輩:
小弟使用Redhat 9.0,其中perl 是利用rpm裝的(perl-5.8.0-88.3)

時常在安裝模組時,(ex HTML-Parser-3.35,ExtUtils-MakeMaker-6.21 )
# perl MakeFile.pl  ==>這時產生的MakeFile
時常會掉字或 ' (單引號)括的不對
不管是重新安裝或使用perl -MCPAN -e shell來安裝
都常遇到無法安裝
perl 產生MakeFile 好像是使用ExtUtils-MakeMaker模組
結果想要重裝新版ExtUtils-MakeMaker-6.21 也無法安裝
產生出來的MakeFile又掉字,但試著修改後可以make了
但make test又出錯了

代碼: [選擇]

t/basic.................ok 7/79sh: -c: line 2: unexpected EOF while looking for matching `''
sh: -c: line 4: syntax error: unexpected end of file
t/basic.................NOK 8#     Failed test (t/basic.t at line 80)        
t/basic.................NOK 9#     Failed test (t/basic.t at line 81)        
sh: -c: line 2: unexpected EOF while looking for matching `''
sh: -c: line 4: syntax error: unexpected end of file
t/basic.................NOK 10#     Failed test (t/basic.t at line 88)      
#          got: '512'
#     expected: '0'
#


不知各位前輩有沒有遇過相關的問題,可否給小弟一個釣竿

先謝謝各位前輩的指教

AnsonShen

  • 懷疑的國中生
  • **
  • 文章數: 59
    • 檢視個人資料
[問題]請教有關perl 產生MakeFile錯誤
« 回覆 #1 於: 2004-02-18 11:55 »
今天好像解了,只好自問自答
以下是從spamassassin中看到的

Note for Perl 5.8 Users (incl Red Hat 8)
----------------------------------------

Perl 5.8 now uses Unicode internally by default, which causes trouble for
SpamAssassin (and almost all other reasonably complex pieces of perl
code!).

We've worked around this in most places, as far as we know, but there may
still be some issues.  In addition, there is a speed hit, which it would
be nice to avoid.

Setting the LANG environment variable before any invocation of
SpamAssassin sometimes seems to help fix it, like so:

  export LANG=en_US

Notably, the LANG setting must not include "utf8".   However, some folks
have reported that this makes no difference. ;)
========
結果就是環境變數"LANG"造成的 >"<
在小弟的LANG預設為LANG=en_US-utf8
改成LANG=en_US,
就成功了
希望這篇對大家有些幫助