[SOLVED] command not found when chrooted into Debian

I have used Debian previously. I have a debian chroot on a separate partition which sole purpose is apache2 server. I use apache2 in chroot, so everytime I reinstall my main system, all my projects are left there in this system untouched. The chroot was created with Debian's debootstrap. Now when I moved from Debian to Arch, I can't use this chroot. When I chroot into it I can't execute any command there, all I get is command not found, even on things such as ls, rm, mv.
Does it mean that I have to create a chroot for server again, using Arch linux or is there a way to get this Debian working?
Last edited by kox (2015-05-02 20:13:22)

I don't think the `arch-chroot` script will work for a Debian system but I could be wrong.
Have you tried mounting /proc, /sys & /dev first and sourcing the shell profiles afterwards?
https://wiki.archlinux.org/index.php/Ch … ing_chroot
This shouldn't make any difference as the chroot fstab should already have entries for these but you never know...
Maybe you should copy /etc/hosts & /proc/mounts from your new Arch system into your Debian chroot.
https://wiki.debian.org/Debootstrap
@WorMzy -- the shell built-ins are not working so I don't think it's a $PATH issue.
Last edited by Head_on_a_Stick (2015-05-02 19:41:44)

Similar Messages

  • "command not found" when using bash as root [SOLVED]

    Some examples:
    bash: gparted: command not found
    bash: cryptsetup: command not found
    bash: lsusb: command not found
    All of these are defintely installed, and work without any problems if I type in their full path. Any idea why this is happening?
    Last edited by SkyValley (2008-12-15 02:57:30)

    That means you're not starting it as a login shell, so you may want to look in to that.
    /etc/profile is what you need,
    echo "source /etc/profile" > /root/.bashrc
    That's safe to do regardless and you can look in to the login shell problem later.

  • 'java_wrapper: command not found'  when running license script

    Hello, am trying to run a third party application licensing script which needs JRE to run. This script is failing with the following error. 'java_wrapper: command not found' ...
    Can anyone assist with ideas of resolution?! Does a path need to be set? Does JRE (1.4.1_x) need to live in a specific part of the unix filesystem (solaris 8)?!
    Thanks!!

    This is not a TNS names issue if you can connect to database. It could be a network problem, but more likely it's a problem with the installation of the app server. When you install the app server, it should use the name assigned to the server. I don't believe you can just make up a name for an app server unless it is known to the network.

  • [SOLVED] command not found - can anyone help a newbie out with this

    Hi everyone,
    Sorry to be asking such basic information, but I hope you can help...
    I just installed Arch...
    I am logged in as root and I get this error:
    # hwd
    -bash: hwd: command not found
    For future reference, how should I go about finding out what package(s) I need to install in order to be able to use a particular command?  (in this case, the hwd command)
    Also, is there some configuration I may need to perform in order to make a particular command work (in this case hwd) ??
    Thank you!
    Last edited by onthenickel (2009-07-19 07:50:58)

    Thanks!
    Probably the wiki article for Xorg should be updated as it refers the user to use hwd.  I'll see if I can manage to edit it...  I've never edited a wiki before.  I'm learning all sorts of new stuff today :-) 
    http://wiki.archlinux.org/index.php/Xorg
    thanks again!

  • [SOLVED] Command Not Found

    I feel like this is some stupid error I am overlooking, but after searching I cannot figure out why the command is not found.
    $ dmenu-with-yeganesh
    zsh: command not found: dmenu-with-yeganesh
    $ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl:~/.xmonad/bin
    $ ls -Alh ~/.xmonad/bin
    total 4.0K
    -rwxr-xr-x 1 name name 268 Jun 20 13:24 dmenu-with-yeganesh
    Last edited by chetjan (2014-06-20 21:04:45)

    The "~/.xmonad/bin" part in the $PATH is wrong. It should have been expanded to /home/$USER/.xmonad/bin; probably because you quoted the tilda in your .zshrc.

  • Executing CR HOST script, encountering command not found

    Hi All,
    I new to writing Host scripts, especially for use within the Applications.
    I need to go out to an FTP site and grab a file.
    The FTP portion of the script works fine.
    The problem I'm encountering is with the execution of regular commands like 'cd' or 'mv'.
    The error comes back, ...line xx: cd: command not found
    When I have an actual directory path with the cd command - I always get, No such file or directory...
    (I have verified the directory paths I'm attempting to change to exist and available.)
    The FTP portion executes, but the received file goes into some obscure server directory. Can't even perform a move of the file.
    The echo command works fine.
    I have created just a dummy script to do a cd /u32/... command and still the same Error.
    Any suggestions will be very helpful.
    Thanks,
    Bradley

    Here is a main code script....
    #$HEADER: XX_BANK_STMTS_IMPORT
    # PROGRAM NAME: XX_BANK_STMTS_IMPORT
    # PURPOSE:
    # Load XXXX Bank Statements
    # XX Bank Statements Import Concurrent Program
    # This script requires to run as Concurrent Request
    P_LOGIN="$1"
    P_USER_ID="$3"
    P_REQUEST_ID="$4"
    REMOTE_USER=ftpuser
    REMOTE_PASSWD=ftpuser
    FTP_DIR=u32/oracle/DBCTEST/apps/apps_st/xxcust/12.0.0/ftp/inbound
    REMOTE_PATH=public/dbco_cng/reporting
    REMOTE_FILE=*.PGP
    echo "USER = "${USER}
    echo "HOST = "${HOSTNAME}
    echo "Directory = "${PWD}
    cd /u32/oracle/XXXTEST/apps/apps_st/appl/xxcust/12.0.0/ftp/inbound
    echo "Directory = "${PWD}
    echo " Transferring File"
    ftp -n -i -v <<-EOF
    open XX.XX.XXX.XXX
    user $REMOTE_USER $REMOTE_PASSWD
    ##lcd $FTP_DIR
    cd $REMOTE_PATH
    mget $REMOTE_FILE
    EOF
    I get errors like
    /u32/oracle/XXXTEST/apps/apps_st/appl/xxcust/12.0.0/bin/XX_BANKFILE_LOAD.prog: line 108: cd: /u32/oracle/XXXTEST/apps/apps_st/appl/xxcust/12.0.0/ftp/inbound
    : No such file or directory
    or if I just put the cd command:
    cd: commad not found
    The commented out lcd was from previous tries at doing it that way... No luck.
    Thanks.

  • Bash: command not found after piping

    Hi,
    I'm trying something quite commonly found in an Unix environment, namely piping the output of one command into the input of a subsequent one, eg.
       bash$ ps ax | grep -i bash
    But unfortunately I'm receiving--and now comes the most curious part--most of the times (not always!!) an error message
       bash: grep: command not found
    When calling grep directly
       bash$ grep
    the resulting output is
       Usage: grep [OPTION]... PATTERN [FILE]...
       Try `grep --help' for more information.
    "which"-ing the commands
       bash$ which bash ps grep
    results in
       /bin/bash
       /bin/ps
       /usr/bin/grep
    Cheers,
    MMHein

    Good, you tried a different shell.  sh and bash are essentially the same executable on Mac OS X.
    Did you try a new user account?  What were those results?
    Have you tried installing your own bash?  Either build from sources, or use something like MacPorts.org to install one already configured for Mac OS X.
    You also have ksh and zsh if they happen to rock your boat (see /etc/shells for a list of installed shells).
    I think both Linc an dI agree that we have never seen this situation before either, which is why we suspect something has become corrupt.  The "Nuke and Pave" approach tends to eliminate that possibility.  But since you have lots of Unix experience (even though you missed a few Unix flavors ), and want to find the root cause, then you need to start doing tests that eliminate components.
    The shells on my Mac OS X 10.7.2 Lion system have the following chksum's
    cksum /bin/*sh
    188949626 1371648 /bin/bash
    1672788767 772992 /bin/csh
    4164734636 2180736 /bin/ksh
    1711289041 1371712 /bin/sh
    1672788767 772992 /bin/tcsh
    2366092939 1103984 /bin/zsh
    I would expect yours to be identical.  But that does not take into account any libraries used.  And if you have the same values, then you need to look at something else (again, a new account can go a long way to eliminating things in your environment, or pointing to a system component).

  • Recover Accidentally Deleted Files in OS X via Terminal, "command not found"

    Hi!
    I am trying to recover a folder from the trash. It was deleted 30 min ago. The command I am trying to use is;
    Mys-MacBook-Pro:~ storedisk$ com.apple.Finder AppleShowAllFiles true
    And the response is;
    -bash: com.apple.Finder: command not found
    When I open any Terminal window I get this message, I don't know if this is relevant;
    Last login: Wed Nov 13 08:27:40 on ttys001
    I have found some similar replies on the forum but they do not seem to work in my case. I'm new to Terminal so I would really appreciate the help to find the cause and to resolve my problem.
    Thanks a lot!

    Thank you so much. This is the reply that I got;
    Mys-MacBook-Pro:~ storedisk$ ls -a .Trash
    .                                        Cherry Blossoms
    ..                                        FLiCKS
    .DS_Store                              Nicholas Nickleby (1977)
    13 Tzameti                              Robin Hood (2010)
    Catch-22 [1970]                              We Live in Public 2009
    Mys-MacBook-Pro:~ storedisk$ mv .Trash/FLiCKS .
    Mys-MacBook-Pro:~ storedisk$
    Mys-MacBook-Pro:~ storedisk$ mv .Trash/FLiCKS
    usage: mv [-f | -i | -n] [-v] source target
           mv [-f | -i | -n] [-v] source ... directory
    It is the FLiCKS folder that I am trying to retreive. Does this mean that I can retreive it? And if so, when I use the command mv .Trash/filename, where should it appear? Sorry for not fully understanding the instructions.
    I also tend to empty the trash cumpulsively, which is how this happened in the first place. Trying to empty the files already in the trash but accidentally having had this folder selected I emptied that and kept the files that I didn't want.
    The trash folder still has the size as if the folder FLiCKS is still in there though, if that makes any difference?
    Thank you for all of your help.

  • -bash: then : command not found

    Hi
    Sorry i have post the same problem in Infrastruture but i am not getting a quick reply.Thats why i am posting this in the database thread.
    I have installed OEL 5.I am going to install Oracle 11g.I have configured Kernel for oracle.But now when give the command su - oracle there is an
    -bash: then : command not found
    -bash: : command not found
    When i give su - then also same these lines appear.Please send me a solution.
    Will this give nay problem in database installation
    Regards
    Bobby

    user12119634(bobs) wrote:
    Hi
    Sorry i have post the same problem in Infrastruture but i am not getting a quick reply.Thats why i am posting this in the database thread.
    I have installed OEL 5.I am going to install Oracle 11g.I have configured Kernel for oracle.But now when give the command su - oracle there is an
    -bash: then : command not found
    -bash: : command not found
    When i give su - then also same these lines appear.Please send me a solution.
    Will this give nay problem in database installation
    Regards
    BobbyTry
    export PATH=/bin:$PATHthen do again

  • Qbittorrent cant start: command not found

    HI I installed qbittorrent using pacman, but after installation I cant start it. It shows command not found when I write: qbittorrent in terminal.
    What is wrong? Thanks

    https://wiki.archlinux.org/index.php/FA … tart_it.3F
    Edit: qbittorrent works for me. Check if you installed it OK and if your $PATH is OK - try using the full path: /usr/bin/qbittorrent
    Last edited by karol (2011-10-17 15:39:52)

  • TtDaemonAdmin :Command not found    ??

    Hi Guys,
    i am very new to times_ten.Just installed it on unix.
    when i do ttDaemonAdmin, it says command not found
    when i went inside the start_up folder and ran the "tt_times_7" startup script.
    it telsl me that Daemon is running
    Just want to know, if timesten is running then why i am unbale to run ttDaemonAdmin?
    Is there any configuration reqd after installation?

    Thanks Chris,
    Actually i compiled my code on machine1 under user abc.
    the TimesTen was installed on machine1 under user xyz.
    During compilation i gave the path of Timesten LIB and include.
    Now i want to run this code on machine2, under user abc (This is the machine we use for testing and has env similar to our client), whereas machine1 is teh development machine.
    what i did , is i installed the timesten server/client on machine 2.
    Compiled code on machine1.
    now FTP'ed the exe from machine1 to machine2.
    Now when i try to run the process on machine2, it gives the follwoing error
    0509-150 Dependent module libttenD.a could not be loaded.
    0509-022 Cannot load module libttenD.a.
    0509-026 System error: A file or directory in the path name does not exist.
    on echoing the LD_LIBRARY_PATH it gives
    /disk1/users/oracle/product/10.2/lib:/usr/lib:
    whereas the Times Ten LIB is at the following path:
    /disk1/users/timest7/TimesTen/times_7/lib
    Do i need to add this path to the PATH env?

  • [SOLVED] 'sh: nano: command not found' on installation in arch-chroot

    Hello,
    I'm trying to install Arch Linux on a new laptop with a UEFI motherboard, however while following the beginners' guide on the step which requires you to arch-chroot into the /mnt base system to modify the locale.gen file using nano, I receive the following error:
    'sh: nano: command not found'
    I have mounted the partitions, installed the base system and have tried searching online for a solution but nothing seems to work. Also, nano works while outside of arch-root so I believe it is installed on my system.
    I'm almost completely out of ideas on how to fix this, so any help or a point in the right direction would be greatly appreciated.
    - Thanks.
    Last edited by tyor (2013-01-20 12:01:54)

    I had the same problem during my first attempts to install Arch. When you use the command as stated:
    # pacstrap -i /mnt base base-devel
    it seems not all packages were downloaded/installed. Now I know it was my own fault by not selecting the packages properly.
    In the beginnersguide right above the pacstrap command is stated:
    The -i switch can be omitted if you wish to install every package from the base and base-devel groups without prompting.
    So I did, and installed without a problem

  • Virtualbox problem: modprobed_db: command not found[SOLVED]

    I'm running arch in virtualbox.
    and when I run # virtualbox, error:
    "VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: libQtCore.so.4: cannot open shared object file: No such file or directory"
    wiki write: "Note: You may need to update the kernel modules db in order to avoid 'no such file or directory' error when loading vboxdrv. Run: modprobed_db."
    but result:
    "# modprobed_db
    bash: modprobed_db: command not found
    Last edited by lqs (2012-07-27 09:00:44)

    modprobed_db can be found in the AUR. It collects all modules which have ever been loaded on your system. It's very practical if you compile a custom kernel and only want to include the modules you need.
    I think this doesn't solve your problem. Your system is missing the file /usr/lib/libQtCore.so.4 Do you have [testing] enabled? If so, do you also have [community-testing] enabled? I'll need more input to be able to help properly.

  • [solved] yaourt messed up pacman - "pacman: command not found"

    Hi,
    i got some "xxxxxx not found on AUR" messages after doing a "yaourt -Syu --aur" so I began to remove them with "yaourt -Rs xxxxxxx".
    When there was only one left "aqpm2" this is what happened:
    [studio@myhost ~]$ yaourt -Rs aqpm2
    verificando dependências...
    Remover (2): aqpm2-20100615-2  qjson-0.7.1-2
    Tamanho total dos pacotes a serem removidos:   2,93 MB
    Deseja remover estes pacotes? [S/n] s
    (1/2) removendo aqpm2                                                                                                     [##########################################################################] 100%
    (2/2) removendo qjson                                                                                                     [##########################################################################] 100%
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/bin/yaourt: line 201: testdb: comando não encontrado
    now pacman is broken:
    [studio@myhost ~]$ pacman
    bash: pacman: comando não encontrado
    [studio@myhost ~]$ yaourt -Syu --aur
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    You are not allowed to launch /usr/bin/pacman with sudo
    Please enter root password
    Senha:
    bash: /usr/bin/pacman: Arquivo ou diretório não encontrado
    ==> WARNING: problem in pkgbuild.sh library
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    ==> Searching for new version on AUR
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    Unable to open file: /etc/pacman.conf
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/lib/yaourt/basicfunctions.sh: line 10: pacman: comando não encontrado
    /usr/bin/yaourt: line 201: testdb: comando não encontrado
    [studio@myhost ~]$ sudo pacman -Syu
    sudo: pacman: command not found
    please help
    Last edited by capoeira (2010-10-16 14:33:39)

    capoeira wrote:
    can I use pacman-static from this repro?
    I'm afraid to break system even more
    http://repo.archmobile.org/x86_64/archmobile/
    OK, that gave me a segfault, so
    I downloaded the package and copied the folders to root.
    no pacman works but gaves me this errors afterwards:
    pacman-3.4.1-1: description file is missing
    pacman-3.4.1-1: dependency file is missing
    pacman-3.4.1-1: file list is missing
    how do I solve this?
    BTW: should I make a bug-report??
    EDIT: any package I try to instal I get this error:
    erro: não foi possível abrir o arquivo /var/lib/pacman/local/pacman-3.4.1-1/depends: Arquivo ou diretório não encontrado
    (it's in portuguese but i think its understandable)
    Last edited by capoeira (2010-10-15 22:08:36)

  • HT5627 when I copy it in the terminal, it tells me : " sudo: serveradmin: command not found "

    what should I do ? What did I do wrong ?

    This error?
    $ sudo serveradmin
    Password:
    sudo: serveradmin: command not found
    $
    That usually means you're not logged in on an OS X Server configuration — which is separate from having the Server.app tool loaded onto the system, when you're doing remote management —  or as Linc Davis mentions, that the PATH setting is incorrect.  The correct PATH should look something like this:
    $ sudo echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Server.app/Contents/S erverRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
    $
    I wouldn't expect PATH to be incorrect on the root user on the server, barring some site-local tweaks to that context.  But if there have been changes to PATH, then I'd add both bin and sbin within Server.app into the path.  (This change should not be necessary, though.  The PATH should have the correct settings within Server.app by default.)
    If you're looking to use serveradmin on a remote server, then the usual approach is to enable and ssh into the target OS X Server system (ssh [email protected]), or to use ARD or related to push commands, or to use screen sharing and a remote desktop.   ssh is by far the lightest and fastest of these options.  
    AFAIK, the command-line serveradmin tool doesn't do remote management.  There's no obvious way provided to specify the identity of a target server.

Maybe you are looking for

  • Mapping values from the payload in the standard error message in PI 7.31

    Hi, I am working on files that are very large and when such a file fails with some error ,it becomes very difficult to track exactly for which record it is failing. For example if the file has 6000 records and the problem is at 641st record,it takes

  • PO not released

    Hi All , i am facing an issue wherein we are using the customized wf for PO approval but we are using the standard FM to release the PO BBP_PD_PO_STATUS_CHANGE_WF but the workflow got stuck at the release step, i tried releasing by running the FM ind

  • JOptionPane repeating?

    I have a JOptionPane that promts a user for a selection from an array. The problem is that when the user selects one, the JOptionPane pops up again for another choice. How can I get it to only come up once. Here is my code, thanks import java.sql.*;

  • My safari is not leting me download

    hi, i have a problem dowloadin in my apple..it is a mc book pro...running on MOS X nd every timw i press download in any web site nothing happens, when i check the dowloads nd activity option if safari there wud be nothing in download nd it would be

  • Pan and zoom over multiple still pictures

    Is there a way to apply general pan and zoom over multiple  still pictures simultaneously?  I seem to remember doing this in PE10, but don't recall the steps.