Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

subject - install expect on solaris in order to write expect scripts

details from my machine:

uname -a SunOS 5.10 Generic_139555-08 sun4v sparc SUNW,Netra-T5220

I installed Solaris machine ( Solaris 10 ) , and then I installed successfully the following packages in order to build the expect infrastructure on my Solaris machine

But after packages installation I get the following errors

Please advice what needed in order to run expect ?


  /usr/local/bin/expect   -version
  /usr/local/bin/expect: cannot execute


  expect: not found

Example how to install expect for Solaris ( from site - )

( I downloaded the x86packages from sun freeware ) . tcl-8.5.3-sol10-x86-local libgcc-3.4.6-sol10-x86-local expect-5.43.0-sol10-x86-local

   1)pkgadd -d tcl-8.5.3-sol10-x86-local

   2)pkgadd -d libgcc-3.4.6-sol10-x86-local

   3)pkgadd -d expect-5.43.0-sol10-x86-local 
share|improve this question
Also asked on StackOverflow: – glenn jackman May 15 '12 at 13:04

2 Answers 2

up vote 2 down vote accepted

You arent trying to run x86 software on sparc are you?

uname -a

Uninstall the x86 packages and download and install sparc from:

To uninstall packages:

pkginfo | grep SMC

You'll see the three packages you installed, sunfreeware packages always have the SMC prefix, use pkgrm to remove them

share|improve this answer
see update in my quastion – Eytan May 15 '12 at 10:46
You are running sparc, therefore x86 packages wont work, immediately uninstall these packages, and download and install the solaris 10 sparc counterparts. – Sirch May 15 '12 at 11:01
did you know from where - wwhich site I can download the sparc pkgs as expect and tcl etc... – Eytan May 15 '12 at 11:10
Yes, ive added the like to my answer. Sunfreeware has both x86 and sparc packages. – Sirch May 15 '12 at 11:11
so according to your link I need to install the pkgs - expect-5.45-sol10-sparc-local.gz tcl-8.5.10 libgcc-3.4.6 this is true ? – Eytan May 15 '12 at 11:20

There are other sources of Solaris packages, for example OpenCSW. They provide tools to perform automatic dependency resolution, and will make sure to download the right architecture.

pkgadd -d
pkgutil -U
pkgutil -y -i expect

Executables will be placed in /opt/csw/bin, e.g. /opt/csw/bin/expect.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.