localectl is missing on antiX with nosystemd

Tagged: 

  • This topic has 4 replies, 3 voices, and was last updated Sep 26-5:24 pm by Dave.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #67850
    Member
    sta

    localectl is present in the original Debian systemd package. That is why this program missing on antiX with nosystemd. Unfortunately it is required by some software. For example while trying to install ESET Endpoint Antivirus for Linux I get the error:

    # dpkg -i eea-8.1.4.0-ubuntu18.x86_64.deb
    Selecting previously unselected package eea.
    (Reading database ... 187568 files and directories currently installed.)
    Preparing to unpack eea-8.1.4.0-ubuntu18.x86_64.deb ...
    /var/lib/dpkg/tmp.ci/preinst: 16: localectl: not found
    ESET Endpoint Antivirus error: UTF-8 support is not installed in the system. Please install a UTF-8 locale first. Aborting installation.
    dpkg: error processing archive eea-8.1.4.0-ubuntu18.x86_64.deb (--install):
     new eea package pre-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     eea-8.1.4.0-ubuntu18.x86_64.deb

    Any solution of the above problem?

    #67852
    Member
    Xecure
    Helpful
    Up
    0

    If you can figure out what is the localectl command with parameters used in the package, you could create a fake localectl that gives the exact query the package expects.

    As none of us can access the package (both because it is closed source and isn’t easy to find), we cannot know what the package expects.

    Probably this package is made to work the same on all linuX systems, and uses the same method to query the system for the current locale and use the info to set up the interface language, time format, keyboard layout, etc.

    On Debian (and Ubuntu), the command
    locale
    gives info on locale, and /etc/default/keyboard contains keyboard information.

    antiX Live system enthusiast.
    General Live Boot Parameters for antiX.

    #67914
    Forum Admin
    Dave
    Helpful
    Up
    1

    You can also use dpkg -x and dpkg -e to extract the deb contents, alter the preinst script and use dpkg -b to rebuild the package. You will probably need to do that for other items as well given the package is shown as a ubuntu package which likely will have differently named/versioned packages.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #67938
    Member
    sta
    Helpful
    Up
    0

    @Dave
    Good idea.

    The preinst script contains the below listed section:

    # Check for UTF-8 support
    if ! localectl list-locales | grep -i "UTF-8\|UTF8" 1>/dev/null ; then
            print_error 'UTF-8 support is not installed in the system. Please install a UTF-8 locale first. Aborting installation.'
            exit 1
    fi

    Commenting it would be a fast and easy fix.

    #67952
    Forum Admin
    Dave
    Helpful
    Up
    0

    Chances are yes, commenting out will be fine as you know you have a UTF-8 locale.
    However it may be worth changing and / or suggesting to the original package maintainer to alter the case statement to use localectl if it exists else use locale -a. For example it could easily be modified to:

    # Check for UTF-8 support
    if ! localectl list-locales | grep -i "UTF-8\|UTF8" 1>/dev/null ; then
            print_error 'UTF-8 support is not installed in the system. Please install a UTF-8 locale first. Aborting installation.'
            exit 1
    elif ! locale -a | grep -i "UTF-8\|UTF8" 1>/dev/null ; then
            print_error 'UTF-8 support is not installed in the system. Please install a UTF-8 locale first. Aborting installation.'
            exit 1
    fi
    

    Though there are much cleaner ways to achieve the same result.

    • This reply was modified 2 weeks, 5 days ago by Dave.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.