2012-09-06 6 views
6

Ich versuche, Mail mit der Gmail SMTP in Pharo mit Sternzeichen in CentOS Maschine zu senden. Ich erhalte den folgenden Fehler.Zodiac Mail senden in Pharo Smalltalk

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

hatte ich heruntergeladen und setzte das „so.SqueakSSL“ in der virtuellen Maschine Verzeichnis zusammen mit anderen .so-Dateien und „chmod 777 so.SqueakSSL“ verwendet. Aber immer noch den Fehler zeigend. Habe ich etwas verpasst? Der Arbeitsbereichscode lautet:

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

Welche VM? Stellen Sie sicher, dass Sie die neuesten Versionen von unserem [Build-Server] (https://ci.lille.inria.fr/pharo/view/Cog/job/Cog-VM/) verwenden – camillobruni

+0

Bitte beachten Sie, dass dieser Code und die Antworten beziehen sich auf eine ziemlich alte Pharo-Version und nicht mehr für aktuelle Versionen. –

Antwort

3

Es gibt SSL-Plugin fehlt, weil es nicht in früheren Pharos enthalten ist. Aber wenn Sie den One-Click für Pharo 1.4 Summer Release oder später herunterladen, sollte es out-of-the-box funktionieren, denn das Plugin ist an der richtigen Stelle, richtig eingestellt und für alle drei Plattformen (Linux, OS/X und Windows).

+1

genau verwenden wir das SSL-Plugin täglich bei der Interaktion mit dem Google Issue-Tracker von einem Pharo-Skript – camillobruni

0

Wenn Sie auf Linux sind, können Sie einfach einen symbolischen Link von der so.SqueakSSL Datei machen auf dem VM-Verzeichnis eines mit dem Namen SqueakSSL

z.B.

ln -s so.SqueakSSL SqueakSSL

und die VM wird es finden.

3

Vor ein paar Tagen hatte ich ein ähnliches Problem in einem ScientificLinux, das CentOS sehr ähnlich ist. Das Problem war, dass die Bibliotheken libssl.so.0.9.8 und libcrypto.so.0.9.8 benötigt wurden, aber als libssl.so.0.9.8e und libcrypto.so.0.9.8e existierten.

# 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 

Die Lösung wurde zwei symbolische Links zu erstellen:

# 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)