Search code examples
cygwinwindows-xpexpect

Installing more cygwin packages without using setup


I have a Virtual Machine entirely devoted only to VPN connections to different servers. I cannot make any modification on it or I risk to lose some configurations that are needed for some VPNs. In this VM (Windos XP 32bit based) there is already a cygwin installed. I want to install also the expect package in order to run automatic scripts for testing the VPN connections, but if I run the setup command, nearly at the end of the update process a "cancelSynchronousio cannot be located in the dynamic link library kernel32.dll" error is shown and from then on I cannot use cygwin anymore: any time I try to launch cygwin the same error is shown.

Now the question: is there a way to add a cygwin package without running the setup command?


Solution

  • You can install manually the older package. As it seldom changes, depending on the architecture they should be:

    http://mirrors.kernel.org/sourceware/cygwin/x86/release/expect/expect-5.45-1.tar.bz2
    http://mirrors.kernel.org/sourceware/cygwin/x86_64/release/expect/expect-5.45-2.tar.bz2

    assuming the 32bit and that you are able to download it in some way

    tar -xf expect-5.45-1.tar.bz2 -C /
    tar -tf expect-5.45-1.tar.bz2 > expect.lst
    gzip expect.lst
    mv expect.lst.gz /etc/setup
    

    and then add a line to /etc/setup/installed.db with

    expect expect-5.45-1.tar.bz2 1
    

    the file is alphabetically sorted