Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: apt-get errors...

  1. #1
    Join Date
    Mar 2013
    Beans
    7

    apt-get errors...

    Hello fellow ubuntu users,

    So I am very new to using linux and I was installing an application using make install. I have recieved errors during install and I went to delete the files made by make install.

    The following errors happen when I use apt-get install <package name>

    Code:
    dpkg: warning: 'ldconfig' not found in PATH or not executable.
    dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
    dpkg: error: 2 expected programs not found in PATH or not executable.
    Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    Here is how I ended up doing this:

    I had wanted to uninstall aircrack-ng from my system after realizing I couldn't use it with my Wireless card, so I deleted the "sbin" folder under /usr/local/sbin.
    After I recreated the folder is where the error comes in when using apt-get.

    I have checked my sudoers file as well as "echo PATH=<long string for sbin folder>"

    Is there any other solution other than reinstalling ubuntu?


    Many thanks!

  2. #2
    Join Date
    Apr 2012
    Beans
    5,148

    Re: apt-get errors...

    You need to find / fix root's PATH variable (not your own) - try

    Code:
    $ sudo sh -c 'echo $PATH'
    and paste the output back here

  3. #3
    Join Date
    Mar 2013
    Beans
    7

    Re: apt-get errors...

    Quote Originally Posted by steeldriver View Post
    You need to find / fix root's PATH variable (not your own) - try

    Code:
    $ sudo sh -c 'echo $PATH'
    and paste the output back here
    Code:
    mitchell@UR-LINUX1:~$ sudo sh -c 'echo $PATH'
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    mitchell@UR-LINUX1:~$
    It seems to be in there.


    But has my deleting of the sbin folder and recreating it caused an issue (Either the folder itself or a symlink I am unaware of?)

  4. #4
    Join Date
    Mar 2013
    Beans
    7

    Re: apt-get errors...

    The problem is I also have the old fix from the Debian 7 probelm too like my sudoers file already has
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # Please consider adding local content in /etc/sudoers.d/ instead of
    # directly modifying this file.
    #
    # See the man page for details on how to write a sudoers file.
    #
    Defaults env_reset
    Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/$sbin:/bin"
    # Host alias specification
    I just do not want to have to reinstall ubuntu because it took me forever to figure wireless drivers.

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,824
    Distro
    Ubuntu Development Release

    Re: apt-get errors...

    Folder /usr/local/sbin should be:-

    Code:
    Group Owner Permissions
    root  root  drwxr-xr-x

  6. #6
    Join Date
    Mar 2013
    Beans
    7

    Re: apt-get errors...

    I have those set, but still no luck :/

  7. #7
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,824
    Distro
    Ubuntu Development Release

    Re: apt-get errors...

    Here's what my sudoers file contains. Never been messed about with.
    Code:
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # Please consider adding local content in /etc/sudoers.d/ instead of
    # directly modifying this file.
    #
    # See the man page for details on how to write a sudoers file.
    #
    Defaults	env_reset
    Defaults	mail_badpass
    Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root	ALL=(ALL:ALL) ALL
    
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    
    # Allow members of group sudo to execute any command
    %sudo	ALL=(ALL:ALL) ALL
    
    # See sudoers(5) for more information on "#include" directives:
    
    #includedir /etc/sudoers.d

  8. #8
    Join Date
    Mar 2013
    Beans
    7

    Re: apt-get errors...

    Quote Originally Posted by philinux View Post
    Here's what my sudoers file contains. Never been messed about with.
    Code:
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # Please consider adding local content in /etc/sudoers.d/ instead of
    # directly modifying this file.
    #
    # See the man page for details on how to write a sudoers file.
    #
    Defaults    env_reset
    Defaults    mail_badpass
    Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root    ALL=(ALL:ALL) ALL
    
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    
    # Allow members of group sudo to execute any command
    %sudo    ALL=(ALL:ALL) ALL
    
    # See sudoers(5) for more information on "#include" directives:
    
    #includedir /etc/sudoers.d
    Mine has all of thios except the Defaults mail_badpass.

  9. #9
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,824
    Distro
    Ubuntu Development Release

    Re: apt-get errors...

    Just spotted this in yours.

    Code:
     Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/$sbin:/bin"
    Not an expert on this so no idea of significance of $ sign.

  10. #10
    Join Date
    Mar 2013
    Beans
    7

    Re: apt-get errors...

    This is my exact sudoers file, reads like this in gedit AND visudo as well.

    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # Please consider adding local content in /etc/sudoers.d/ instead of
    # directly modifying this file.
    #
    # See the man page for details on how to write a sudoers file.
    #
    Defaults env_reset
    Defaults mail_badpass
    Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # User privilege specification
    root ALL=(ALL:ALL) ALL

    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL

    # Allow members of group sudo to execute any command
    %sudo ALL=(ALL:ALL) ALL

    # See sudoers(5) for more information on "#include" directives:

    #includedir /etc/sudoers.d

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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