Bug 2160565 - can't uninstall ksh rpm: "/usr/bin/ksh93 has not been configured as an alternative for ksh"
Summary: can't uninstall ksh rpm: "/usr/bin/ksh93 has not been configured as an altern...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ksh
Version: 37
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Vincent Mihalkovič
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-12 20:50 UTC by Andrew
Modified: 2023-07-24 14:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-24 14:43:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew 2023-01-12 20:50:36 UTC
Disclaimer: I did not remember how I got ksh installed, and all of this might be just historical mess in my setup updated by `dnf distro-sync` for years.
Anyway, let it be here for google which doesn't know these ksh-related errors at all. Feel free to close this ticket as invalid.

The problem is this:

  # rpm -e ksh
  /usr/bin/ksh93 has not been configured as an alternative for ksh
  error: %preun(ksh-3:1.0.3-1.fc37.x86_64) scriptlet failed, exit status 2
  error: ksh-3:1.0.3-1.fc37.x86_64: erase failed

And for this case following part of install scriptlet can't complete as well:

  # /usr/sbin/alternatives --install /usr/bin/ksh ksh /usr/bin/ksh93 50
  the primary link for ksh must be /bin/ksh

At the same time:

  # ll /usr/bin/ksh /usr/bin/ksh93 /etc/alternatives/ksh
  lrwxrwxrwx. 1 root root      10 Apr 12  2020 /etc/alternatives/ksh -> /bin/ksh93
  lrwxrwxrwx. 1 root root      21 Apr 12  2020 /usr/bin/ksh -> /etc/alternatives/ksh
  -rwxr-xr-x. 1 root root 1428368 Sep 19 13:54 /usr/bin/ksh93

Comment 1 Vincent Mihalkovič 2023-07-24 14:43:39 UTC
I installed ksh on fresh fedora-37 (`dnf install ksh`)
and erased (uninstalled) it (`rpm -e ksh`) successfully - everything works as expected.


Note You need to log in before you can comment on or make changes to this bug.