Cygwin Upgrades and rebaseall

When you upgrade the Cygwin openssl package (or possibly any package, but the openssl package has caused the most problems for me) you are sometimes hit with mysterious-looking errors that go away if you run rebaseall. So I have taken the habit of always making sure that I install the rebase and ash packages when I do the initial Cygwin installation, and then run rebaseall after I upgrade any components.

Running rebaseall can be a bit tricky. The only Cygwin program that can be running at the time is the ash shell. So first of all you need to shut down any long running processes like sshd, close all Cygwin prompts and so on. Next you need to start the plain Windows Command Prompt (if you normally run as unprivileged user but install software as Administrator, then you want to start the prompt by right clicking the icon and selecting Run As… and choosing an administrator account). Then type the following commands (assuming default Cygwin installation location):

cd \cygwin\bin
ash
PATH=. rebaseall -v

This should result in several lines of output similar to:

/usr/lib/xyz.dll new base = 1234, new size = 123

After that you can restart any long running processes, start the normal Cygwin shell and all should be good.

Similar Posts:

One Comment

  1. Roger:

    I use cygwin for many years, mainly to have ssh and rsync in Windows. Since last year, probably when this post were made, my ssh become erratic. Working fine if I have just one session, but with problems if I open one more. I reinstalled cygwin many times, with no success. Actually I thought even in reinstall Windows on my computer, but fortunately I tested in a recent installed Win box and the issues were the same. Almost 1 year later, I found this post and YES! things seem to ok now.

    Thank you for sharing!