I'm installing Xfig and cygwin under Win 8.1, and I'm getting an error that I could not resolve since I'm not much of a bash programmer,
The error:
running: C:\cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/dbus.sh"
could not open /etc/xml/catalog for saving
add command failed
could not open /etc/xml/catalog for saving
add command failed
abnormal exit: exit code=2
The file and directories:
$ ls -al
total 9
drwxr-xr-x 1 Admin Administrators 0 Feb 26 10:30 .
drwxr-xr-x 1 Admin Administrators 0 Feb 26 10:31 ..
-rw-r--r-- 1 Admin Administrators 321 Feb 26 10:31 catalog
The content of catalog:
$ more catalog
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="fonts.dtd" uri="/usr/share/xml/fontconfig/fonts.dtd"/>
</catalog>
The "preremove" script that first runs (no error here):
if /usr/bin/cygrunsrv -Q messagebus &>/dev/null
then
/usr/bin/cygrunsrv -E messagebus
fi
if [ -x /usr/bin/xmlcatalog ] ; then
/usr/bin/xmlcatalog --noout --del \
/usr/share/xml/dbus-1/busconfig.dtd \
/etc/xml/catalog
/usr/bin/xmlcatalog --noout --del \
/usr/share/xml/dbus-1/introspect.dtd \
/etc/xml/catalog
fi
The "postinstall" script that errs out:
mkdir -p /var/lib/dbus /var/run/dbus
/usr/bin/dbus-uuidgen --ensure
if [ -x /usr/bin/xmlcatalog ] ; then
/usr/bin/xmlcatalog --noout --add "system" \
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd" \
/usr/share/xml/dbus-1/busconfig.dtd \
/etc/xml/catalog
/usr/bin/xmlcatalog --noout --add "system" \
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" \
/usr/share/xml/dbus-1/introspect.dtd \
/etc/xml/catalog
fi
Questions:
- Any idea on what's wrong, and how to fix it?
- Can anyone tell me what those scripts do? I think "if [ -x ]" checks whether /usr/bin/xmlcatalog is executable, but I'm not sure about the rest.
@Uruk-hai
depending on how your Windows machines is set up.... you might need to run the cygwin installation as the user having Administrative privs. I certainly do on my Windows box.
Run 'setup-x86_64.exe' (if that's Cygwin installation binary you're running) as "administrator".
See if you get any further.
I'm 99% certain that I've tried running the install as an admin, but just to be certain, I'll try it again.
There was another, much more serious error where cygwin created a directory with some royally messed up attributes and ownerships, so a latter process was unable to write into. However, I was able to bypass that by pre-creating said directory from windows before starting the setup.
@Uruk-hai the Cygwin install should require NO manual intervention - the install has been solid for years (at least for me for a number of laptops I've had).
It was working fine last year, but it had 2 errors earlier this year. (late February, to be exact)
Since the setup is mostly automated and I reprod it with both Win 8.1 and Win 10, I'm fairly confident that it was a cygwin issue.
In any case, last night I downloaded the latest version of setup and reinstalled cygwin using the current code -- the other bug (where I found a workaround) was fixed, but this one is still there.
2025/04/09 01:38:14 running: C:\Cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/dbus.sh"
could not open /etc/xml/catalog for saving
add command failed
could not open /etc/xml/catalog for saving
add command failed
2025/04/09 01:38:15 abnormal exit: exit code=2
Hi @Uruk-hai,
please post the output of
id && ls -ld / /etc /etc/xml && touch /etc/xml/catalog
Hi, output is shown below:
$ id && ls -ld / /etc /etc/xml && touch /etc/xml/catalog
uid=197609(Admin) gid=197121(None) groups=197121(None),197614(HelpLibraryUpdaters),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This Organization),113(Local account),4095(CurrentSession),66048(LOCAL),262154(NTLM Authentication),401408(Medium Mandatory Level)
drwxr-xr-x 1 Admin Administrators 0 Apr 9 02:07 /
drwxr-xr-x 1 Admin Administrators 0 Apr 9 01:38 /etc
drwxr-xr-x 1 Admin Administrators 0 Apr 9 01:38 /etc/xml