Results 1 to 6 of 6

Thread: Commands can't call child commands

  1. #1

    Default Commands can't call child commands

    Hello everyone.

    Ever since I upgraded to LEAP42.3, I have had issues installing software.
    My zypper would be unable to use rpm. (yes I used sudo).
    I found a workaround for this with the 'su -' command, to simulate an actual login, thinking i needed to fix my rpm.

    Now i tried to unpack a .tar.bz2 file (hoping to re-install rpm that way), but my command failed. The tar command could not call the bzip

    Below you'll find the code i had issues with. For testing purposes I will use neovim.

    As regular user with sudo access:
    Code:
    $ sudo zypper install neovim
    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...
    
    The following 16 NEW packages are going to be installed:
      libjemalloc2 libmsgpackc2 libtermkey1 libunibilium0 libuv1 libvterm0 neovim neovim-lang python3-greenlet python3-msgpack-python python3-neovim python-greenlet python-msgpack-python python-neovim python-trollius xsel
    
    The following 4 recommended packages were automatically selected:
      neovim-lang python3-neovim python-neovim xsel
    
    16 new packages to install.
    Overall download size: 0 B. Already cached: 5,0 MiB. After the operation, additional 20,4 MiB will be used.
    Continue? [y/n/...? shows all options] (y): y
    In cache libjemalloc2-4.0.3-4.1.x86_64.rpm                                                                                                                                                             (1/16), 118,8 KiB (310,4 KiB unpacked)
    
    [cut out some stuff due to character limit]
    
     (15/16),  64,1 KiB (225,4 KiB unpacked)
    In cache neovim-lang-0.2.0-1.8.noarch.rpm                                                                                                                                                             (16/16), 430,8 KiB (  2,2 MiB unpacked)
    Checking for file conflicts: ..........................................................................................................................................................................................................[done]
    ( 1/16) Installing: libjemalloc2-4.0.3-4.1.x86_64 ....................................................................................................................................................................................[error]
    Installation of libjemalloc2-4.0.3-4.1.x86_64 failed:
    Error: Subprocess failed. Error: RPM failed: Can't exec 'rpm' (No such file or directory).
    
    As superuser, logged in with the command 'su -':
    Code:
    $ su -
    Password:  
    nick-LNX.local:/root # zypper install neovim
    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...
    
    The following 16 NEW packages are going to be installed:
      libjemalloc2 libmsgpackc2 libtermkey1 libunibilium0 libuv1 libvterm0 neovim neovim-lang python-greenlet python-msgpack-python python-neovim python-trollius python3-greenlet python3-msgpack-python python3-neovim xsel
    
    The following 4 recommended packages were automatically selected:
      neovim-lang python-neovim python3-neovim xsel
    
    16 new packages to install.
    Overall download size: 0 B. Already cached: 5.0 MiB. After the operation, additional 20.4 MiB will be used.
    Continue? [y/n/...? shows all options] (y): y
    In cache libjemalloc2-4.0.3-4.1.x86_64.rpm                                                                                                                                                             (1/16), 118.8 KiB (310.4 KiB unpacked)
    In cache libmsgpackc2-1.4.1-3.1.x86_64.rpm                                                                                                                                                             (2/16),  19.0 KiB ( 28.6 KiB unpacked)
    
    [cut out some stuff due to character limit]
    
    In cache python-neovim-0.1.13-1.2.noarch.rpm                                                                                                                                                          (15/16),  64.1 KiB (225.4 KiB unpacked)
    In cache neovim-lang-0.2.0-1.8.noarch.rpm                                                                                                                                                             (16/16), 430.8 KiB (  2.2 MiB unpacked)
    Checking for file conflicts: ..........................................................................................................................................................................................................[done]
    ( 1/16) Installing: libjemalloc2-4.0.3-4.1.x86_64 .....................................................................................................................................................................................[done]
    ( 2/16) Installing: libmsgpackc2-1.4.1-3.1.x86_64 .....................................................................................................................................................................................[done]
    
    [cut out some stuff due to character limit]
    
    (16/16) Installing: neovim-lang-0.2.0-1.8.noarch ......................................................................................................................................................................................[done]
    
    trying to extract rpm tar.bz2 as user with sudo access:
    Code:
    $ sudo tar xvfj ~/Downloads/general/rpm-4.13.0.1.tar.bz2 -C /opt
    tar (child): bzip2: Cannot exec: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    
    
    What could be causing this? How can I fix it?

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Commands can't call child commands

    what you are saying is zypper does not work when called with sudo (because rpm can not be found) but works with su -?
    can you run rpm as an ordinary user just do
    Code:
    rpm
    if not check and see what the $PATH variable is just do
    Code:
    echo $PATH
    I'm not sure where you got that bzip archive but I'm reasonably sure the cause of the error is that /opt does not exist on your system and don't do that that won't fix anything

    if rpm can be run by an ordinary user and you said it was an upgraded system tell us the output of (if you upgraded from 42.2)
    Code:
    rpm -qa --queryformat "%{Name}:%{Distribution}\n" | grep -F "42.2"

  3. #3

    Default Re: Commands can't call child commands

    Command output as per request:
    Code:
    $ rpm
    RPM version 4.11.2
    Copyright (C) 1998-2002 - Red Hat, Inc.
    This program may be freely redistributed under the terms of the GNU GPL
    
    Usage: rpm [-afgpcdLlsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires] [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles] [-L|--licensefiles]
            [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript] [--allfiles] [--allmatches] [--badreloc] [-e|--erase=<package>+] [--excludedocs]
            [--excludepath=<path>] [--force] [-F|--freshen=<packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest] [--nocontexts] [--noorder] [--noscripts]
            [--notriggers] [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>] [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test] [-U|--upgrade=<packagefile>+] [-D|--define='MACRO EXPR']
            [--undefine=MACRO] [-E|--eval='EXPR'] [--macros=<FILE:...>] [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root=ROOT] [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
            [-?|--help] [--usage] [--scripts] [--setperms] [--setugids] [--conflicts] [--obsoletes] [--provides] [--requires] [--recommends] [--suggests] [--supplements] [--enhances] [--info] [--changelog] [--xml]
            [--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext] [--fileprovide] [--filerequire] [--filecaps]
    Code:
    $ echo $PATH
    /opt/PhpStorm-171.4694.2/bin:/opt/pycharm-2017.2/bin/:/opt/idea-IU-172.3544.35/bin:/opt:/home/nick/.config/composer/vendor/bin:/opt/Discord:/opt/node-v6.11.2-linux-x64/bin:/opt/node-v6.11.2-linux-x64/lib/node_modules/npm/bin:/home/nick/b
    in:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
    This command had no output.
    Code:
    $ rpm -qa --queryformat "%{Name}:%{Distribution}\n" | grep -F "42.2"
    I have been able to extract files with the tar command to /opt in the past, as you can see in my $PATH variable. I'm not entirely sure it's the right place to store those programs (for all users) tho.

  4. #4
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Commands can't call child commands

    as rpm works there is no need for it's replacement
    my best guess is one of the folders in your $PATH is misconfigured check if all exist
    I'd suggest creating a new test user and see if the issue exists with a clean profile
    you didn't say from what OS and how you did the upgrade
    Code:
    rpm -qa --queryformat "%{Name}:%{Distribution}\n" | grep -F "42.2
    is if you did from 42.2

  5. #5

    Default Re: Commands can't call child commands

    I upgraded from 42.2 to 42.3 following this guide: https://en.opensuse.org/SDB:System_upgrade

  6. #6

    Default Re: Commands can't call child commands

    When creating a new user, test, who has sudo access, i got this after logging in directly with the test account:
    Code:
    test@nick-LNX:~> sudo zypper remove neovimLoading repository data...
    Reading installed packages...
    Resolving package dependencies...
    
    
    The following 4 packages are going to be REMOVED:
      neovim neovim-lang python3-neovim python-neovim
    
    
    4 packages to remove.
    After the operation, 16.9 MiB will be freed.
    Continue? [y/n/...? shows all options] (y): y
    (1/4) Removing neovim-lang-0.2.0-1.8.noarch .....................................[error]
    Removal of (2002)neovim-lang-0.2.0-1.8.noarch(@System) failed:
    Error: Subprocess failed. Error: RPM failed: Can't exec 'rpm' (No such file or directory).
    I think this confirms the issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •