Results 1 to 8 of 8

Thread: $PATH reports: No such file or directory

  1. #1
    Join Date
    Sep 2019
    Beans
    3

    $PATH reports: No such file or directory

    hey everyone,

    having a bit of an issue with my ubuntu currently and even though I have the suspicion that I'm close to a solution I'm not profficient enough in linux to solve it.

    Running a Ubuntu 18.04 fresh install, issue is that my dkpg gives install-info errors when I update/install packages, i'll first describe the main issue I'm facing:


    When I run any apt-get update/install/remove command after the initial gathering of the package I get the following message (no matter what I try to run/get):

    Setting up install-info (6.5.0.dfsg.1-2) ...
    /usr/sbin/update-info-dir: 1: /etc/environment: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: not found
    dpkg: error processing package install-info (--configure):
    installed install-info package post-installation script subprocess returned error exit status 127
    Errors were encountered while processing:
    install-info
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    I suspect it involves something in my /etc/environment file, but I cannot find anything off with it; my hope is someone here can see the problem.
    Heres my /etc/environment file;


    $PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    $linux_ip = 192.168.100.38
    $linux_hostname = "vmwbpap03"
    $domain = "intern.domainname.nl"
    $ad_ip = 192.168.1.2
    $ad_hostname = "Hostname AD"

    The current main problem i see is that when I Type $PATH in the console I get the following message:

    root@vmwbpapp03:~# $PATH
    -bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin: No such file or directory

    --

    Any idea how to solve this problem?

    Any and all suggestions on how to proceed/solve this would be greatly appreciated
    Last edited by wardenburg; September 16th, 2019 at 12:35 PM.

  2. #2
    Join Date
    Feb 2015
    Beans
    Hidden!
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: $PATH reports: No such file or directory

    Quote Originally Posted by wardenburg View Post
    ...The current main problem i see is that when I Type $PATH in the console I get the following message:...

    Any idea how to solve this problem?

    Any and all suggestions on how to proceed/solve this would be greatly appreciated
    To get rid of the bash error message and show the path use the command...
    Code:
    echo $PATH
    Just expanding the system path as a command is why you are getting the "-bash: ... No such file or directory" error.

    Try echoing the system path with the command above to see the path.

    I'm not particularly sure about the original dpkg aspect of your post, await further help on that.

    Regards, yeti.

  3. #3
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: $PATH reports: No such file or directory

    :/snap/bin=/

    The = sign looks odd to me in your $PATH

  4. #4
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,523
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: $PATH reports: No such file or directory

    Quote Originally Posted by wardenburg View Post
    I suspect it involves something in my /etc/environment file, but I cannot find anything off with it; my hope is someone here can see the problem.
    Heres my /etc/environment file;
    Code:
    $PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    $linux_ip = 192.168.100.38
    $linux_hostname = "vmwbpap03"
    $domain = "intern.domainname.nl"
    $ad_ip = 192.168.1.2
    $ad_hostname = "Hostname AD"
    If you really have a $ at the start of each line, then that's your problem. These should not be there.

  5. #5
    Join Date
    Sep 2019
    Beans
    3

    Re: $PATH reports: No such file or directory

    Quote Originally Posted by spjackson View Post
    If you really have a $ at the start of each line, then that's your problem. These should not be there.
    Hey There spjackson,

    First off thanks for the reply- the $ are indeed there (I reckon these were placed there following this assp guide I followed, I dont consider myself an expert linux user to do these changes without a guide)

    I attempted to remove them resulting in;

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    linux_ip = 192.168.100.38
    linux_hostname = "vmwbpap03"
    domain = "intern.domainname.nl"
    ad_ip = 192.168.1.2
    ad_hostname = "Hostname AD"
    I'm attempting to install sqlite3 with the 'apt-get install sqlite3' command. resulting in the following error:

    Preconfiguring packages ...
    Setting up install-info (6.5.0.dfsg.1-2) ...
    /usr/sbin/update-info-dir: 2: /etc/environment: linux_ip: not found
    dpkg: error processing package install-info (--configure):
    installed install-info package post-installation script subprocess returned error exit status 127
    Errors were encountered while processing:
    install-info
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Noting the linux_ip error I tried the following environment:

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    which resulted in the following error:

    Preparing to unpack .../sqlite3_3.22.0-1ubuntu0.1_amd64.deb ...Unpacking sqlite3 (3.22.0-1ubuntu0.1) ...
    Setting up sqlite3 (3.22.0-1ubuntu0.1) ...
    Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
    W: APT had planned for dpkg to do more than it reported back (5 vs 9).
    Affected packages: install-info:amd64
    So I suppose that the problem has something to do with the environment but I'm at a loss where to begin with how to solve this.

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,610
    Distro
    Kubuntu Development Release

    Re: $PATH reports: No such file or directory

    My /etc/environment just includes the PATH. Are those other items designed to join a Microsoft Active Directory network? I suggest you dump them until you get everything working correctly.

    /etc/environment
    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,523
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: $PATH reports: No such file or directory

    Quote Originally Posted by wardenburg View Post
    First off thanks for the reply- the $ are indeed there (I reckon these were placed there following this assp guide I followed, I dont consider myself an expert linux user to do these changes without a guide)

    I attempted to remove them resulting in;
    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    linux_ip = 192.168.100.38
    linux_hostname = "vmwbpap03"
    domain = "intern.domainname.nl"
    ad_ip = 192.168.1.2
    ad_hostname = "Hostname AD"
    
    I'm attempting to install sqlite3 with the 'apt-get install sqlite3' command. resulting in the following error:
    Code:
    Preconfiguring packages ...
    Setting up install-info (6.5.0.dfsg.1-2) ...
    /usr/sbin/update-info-dir: 2: /etc/environment: linux_ip: not found
    Noting the linux_ip error I tried the following environment:
    man 5 environment says "The file must consist of simple NAME=VALUE pairs on separate lines." I don't think you can have the spaces before and after the =, just as with variable assignment in the shell. Sorry I missed this originally.
    In a shell:
    Code:
    linux_ip=192.168.100.38
    echo $linux_ip
    192.168.100.38
    

    But...
    Code:
    linux_ip = 192.168.100.38
    bash: linux_ip: command not found

  8. #8
    Join Date
    Sep 2019
    Beans
    3

    Thumbs up Re: $PATH reports: No such file or directory

    Quote Originally Posted by SeijiSensei View Post
    My /etc/environment just includes the PATH. Are those other items designed to join a Microsoft Active Directory network? I suggest you dump them until you get everything working correctly.

    /etc/environment
    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
    I think this was the idea yeah, It might've been parts of my attempt to join an AD before I found the realm join command

    Quote Originally Posted by spjackson View Post
    man 5 environment says "The file must consist of simple NAME=VALUE pairs on separate lines." I don't think you can have the spaces before and after the =, just as with variable assignment in the shell. Sorry I missed this originally.
    In a shell:
    Code:
    linux_ip=192.168.100.38
    echo $linux_ip
    192.168.100.38
    

    But...
    Code:
    linux_ip = 192.168.100.38
    bash: linux_ip: command not found
    This was the solution, Learning a lot here fellas. (It works now and I couldn't be happier)

    Thank you so much for the help,

Tags for this Thread

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
  •