× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Karl,

The message "Symbol __pthread (number 93) is not exported. . ." means that the version of the pthread library on your system does not match the one that sftp was compiled for.

(You should receive the same error if you run sftp interactively, instead of running it via Expect.)

To try to put this in terms you might already understand: The pthread library (/usr/lib/libpthreads.a) is very similar to what we call a *SRVPGM in the ILE environment. The sftp program is trying to call a "symbol" (=exported procedure) from that library (=service program) but it doesn't have the same export number.

Since sftp is typically provided by IBM, you may have installed a newer version of sftp that's not supported by the operating system you installed it onto. (For example, maybe you installed a copy of OpenSSH that requires V5R4, but you're trying to install it onto V5R3) Or perhaps you are running on a current operating system, but have an older version of PASE installed? (for example, maybe you're running V5R3, but have the V5R2 version of PASE installed.) Those are the sorts of things to look for.

Hope that helps.


On 7/17/2012 11:36 AM, Karl wrote:
Hi ,

We are using PASE environment to upload some files to an external secure
ftp server over SSH.
Our server is V6R1

We are using the example from Scott with the expect tool.

The script is pretty simple and it does work fine on many other IBM i
server.

We load variables with ADDENVVAR and call QP2TERM

Call QP2Shell Parm('/QOpenSys/bin/sh' '-c' &Parm3) ... and we have the
following error. (I also try the command interactivly... same error)



spawn sftp MyUser@xxxxxxxxxxxxxxxxxxxxxxxxx
Could not load program sftp:
Symbol resolution failed for sftp because:
Symbol __pthread (number 93) is not exported from dependent
module /usr/lib/libpthreads.a(shr_xpg5.o).
Examine .loader section symbols with the 'dump -Tv' command.



Licence programs 5733SC1 *Base and Option 1 are installed. (I also try to
reinstall then, but I still have the same error)


5733SC1 *BASE IBM Portable Utilities for i5/OS
5733SC1 1 OpenSSH, OpenSSL, zlib

Does someone know what this error means?
I did some search on google but many unresolved post.

I know I little bit how Pase work, but I'm not familiar with.


Thanks for your help.

Karl

**********************************
Here's what my "Put" script looks like.

#!/bin/sh



build_script() {



cat <<End-of-message

#!/usr/local/bin/expect -f

spawn sftp ${USER}@${SFTPHOST}

expect "connecting (yes/no)?" { send "yes\n"; expect "Password:" }
"Password:"
send "${PASSWORD}\n"

expect "sftp>"

send "put ${FROMFILE} ${TOFILE} \n"

expect "sftp>"

send "quit\n"

exit

End-of-message



}




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.