I am reading the book "Why programs fail" from Andreas Zeller. It has exercises that requires using the Android automation tool (not to be confused with Google's OS). I could download it from the author's website but when I started the android file as described in the user's guide I got the following error:

bash: ./android: /usr/bin/expectk: bad interpreter: No such file or directory

I tried to install expectk:

sudo apt-get install expectk

But I got the error message:

E: Package 'expectk' has no installation candidate.

The question is: How can I install this expectk to make Android work? I am working on Debian 9.


expectk was dropped from Expect in version 5.45. NEWS.Debian gives possible workarounds:

As of Expect 5.45 expectk was removed from the upstream distribution and from the Debian package as well. If you're using expectk replace it either by expect and package require Tk or by wish and package require Expect.

You need to install the expect package and adapt the android script as described above.

  • Thanks, I modified the shebang of android to #!/usr/bin/expect. I added a line: package require Tk. Now I get a different error: Can't find package android while executing "package require android". And the menumgr packages is also missing. I tried copying the files mentioned in android-0.99.9.spec to /usr/local/bin and to /usr/bin but this had no effect.
    – z32a7ul
    May 23 '18 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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