2012-09-06 67 views
6

我想用CentOS機器中的生肖在Pharo中用gmail smtp發送郵件。我收到以下錯誤。在Pharo smalltalk中發送的生肖郵件

"SSL/TLS plugin initialization failed. VM missing plugin? " 

我已經下載並把「so.SqueakSSL」在虛擬機目錄與其他.so文件一起並用「搭配chmod 777 so.SqueakSSL」。但仍然顯示錯誤。我錯過了什麼?工作區的代碼是:

Gofer it 
    squeaksource: 'Zodiac'; 
    package: 'Zodiac-Core'; 
    package: 'Zodiac-Tests'; 
    package: 'Zodiac-Extra'; 
    load. 

    "Load extra Zinc support for Zodiac" 

Gofer it 
squeaksource: 'ZincHTTPComponents'; 
package: 'Zinc-Zodiac'; 
load. 
| mailMessage | 
mailMessage := MailMessage empty. 
mailMessage setField: 'subject' toString: 'ZdcSecureSMTPClient Test'. 
mailMessage body: (MIMEDocument 
       contentType: 'text/plain' 
       content: 'This is test from Pharo Smalltalk'). 
ZdcSecureSMTPClient 
sendUsingGMailAccount: '[email protected]' 
password: 'mypassword' 
to: '[email protected]' 
message: mailMessage. 
+0

哪個VM?請確保使用我們[構建服務器]的最新版本(https://ci.lille.inria.fr/pharo/view/Cog/job/Cog-VM/) – camillobruni

+0

請注意,此代碼和答案涉及一個相當老的pharo版本,不再適用於當前版本。 –

回答

3

有SSL插件丟失,因爲它不是在早期燈塔包括在內。但是,如果您下載Pharo 1.4 Summer Release或更高版本的一鍵式下載,它應該可以開箱即用,因爲插件位於正確的位置,正確設置並適用於所有三種平臺(Linux,OS/X和Windows)。

+1

確切地說,我們每天在從Pharo腳本與Google問題跟蹤器交互時使用SSL插件 – camillobruni

0

如果你是在Linux上,你可以只是使從VM目錄so.SqueakSSL文件的符號鏈接到一個名爲SqueakSSL

例如

LN -s so.SqueakSSL SqueakSSL

和VM會發現它。

3

幾天前,我在ScientificLinux中遇到了類似CentOS的問題。問題是庫需要libssl.so.0.9.8和libcrypto.so.0.9.8,但是以libssl.so.0.9.8e和​​libcrypto.so.0.9.8e的形式存在。

# ldd /opt/smalltalk/pharovm14A/libSqueakSSL.so 
     linux-gate.so.1 => (0x00bfb000) 
     libssl.so.0.9.8 => not found 
     libcrypto.so.0.9.8 => not found 
     libc.so.6 => /lib/libc.so.6 (0x006ce000) 
     /lib/ld-linux.so.2 (0x0055a000) 

# ls /usr/lib/libssl.so.0.9.8* /usr/lib/libcrypto.so.0.9.8* 
/usr/lib/libcrypto.so.0.9.8e /usr/lib/libssl.so.0.9.8e 

的解決方案是創建兩個符號鏈接:

# ln -s /usr/lib/libssl.so.0.9.8e /usr/lib/libssl.so.0.9.8 
# ln -s /usr/lib/libcrypto.so.0.9.8e /usr/lib/libcrypto.so.0.9.8 

# ldd /opt/smalltalk/pharovm14A/libSqueakSSL.so 
/opt/smalltalk/pharovm14A/libSqueakSSL.so: /usr/lib/libcrypto.so.0.9.8: no version information available (required by /opt/smalltalk/pharovm14A/libSqueakSSL.so) 
/opt/smalltalk/pharovm14A/libSqueakSSL.so: /usr/lib/libssl.so.0.9.8: no version information available (required by /opt/smalltalk/pharovm14A/libSqueakSSL.so) 
     linux-gate.so.1 => (0x0062d000) 
     libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x008a8000) 
     libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00110000) 
     libc.so.6 => /lib/libc.so.6 (0x00a3f000) 
     libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x0025f000) 
     libkrb5.so.3 => /lib/libkrb5.so.3 (0x0029e000) 
     libcom_err.so.2 => /lib/libcom_err.so.2 (0x00eee000) 
     libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x00374000) 
     libresolv.so.2 => /lib/libresolv.so.2 (0x00e41000) 
     libdl.so.2 => /lib/libdl.so.2 (0x00e0c000) 
     libz.so.1 => /lib/libz.so.1 (0x00477000) 
     /lib/ld-linux.so.2 (0x007f9000) 
     libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x003a0000) 
     libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x003ab000) 
     libpthread.so.0 => /lib/libpthread.so.0 (0x005fd000) 
     libselinux.so.1 => /lib/libselinux.so.1 (0x009b4000) 
相關問題