Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-14-2013, 03:56 PM   #1
LQ Newbie
Registered: Nov 2013
Posts: 2

Rep: Reputation: Disabled
Question No such file or directory - but it's right there

Hi, all!

This is my first post to the boards here, so I can't yet make attachments to my posts else I'd post a screenshot of my problem.

I'm attempting to run a script (, but it will not find a file (adb) no matter what I do. This program is not one I made myself, it is the program tether-linux, which I untarred and installed myself.

I have used this program on BackTrack5r3 and Ubuntu 12.04LTS without issue, but since upgrading to Kali Linux from BT5r3, it for some reason will not work. I checked the file structure against Ubuntu 12.04 and everything is the same. I installed it the way I always do: (moving the tar file to /usr/local/src first)

tar xzvf tether-linux.tgz
cd into the new directory /Tether/linux/node and run

make install
and receive no errors.

Here is what my terminal looks like when trying to start the tether service:

root@kali:~# cd /usr/local/src/Tether/linux
root@kali:/usr/local/src/Tether/linux# ls
root@kali:/usr/local/src/Tether/linux# ./
Starting Tether...
./ line 38: ../linux/adb: No such file or directory
Opening tun device.
Opening tun device: /dev/net/tun
Forking worker.
Tun/tap device IP:
Reading tun/tap device... 
Opening tun device.
adb binary path: "/usr/local/src/Tether/linux/adb"
Checking phone status...
tun worker initialized.
{ [Error: Command failed: /bin/sh: 1: /usr/local/src/Tether/linux/adb: not found
killed: false, code: 127, signal: null }
Listening on tether port...
root@kali:/usr/local/src/Tether/linux# ls
root@kali:/usr/local/src/Tether/linux# cd\
root@kali:~# /usr/local/src/Tether/linux/adb
bash: /usr/local/src/Tether/linux/adb: No such file or directory
root@kali:~# cd /usr/local/src/Tether/linux
root@kali:/usr/local/src/Tether/linux# ls
root@kali:/usr/local/src/Tether/linux# HELP!!!
As we can see, adb is clearly there and it's where the installer put it, which is the same place as the Ubuntu install, which works fine. I've also done:

rm -r Tether
, rebooted, and installed the entire thing over again and get the same error.

Any help in getting this shell script to recognize that adb is there would be greatly appreciated! I need to tether since Kali doesn't come with the wicd network manager and thus I need to download it.

Hopefully as I post around the boards I'll be granted permission to post attachments, a screenshot would have been much easier for you to read.


PS - Unless I'm mistaken, Kali is always in root, but just to make sure I tried running the ./ script in a sudo shell and got the same error. sudo command did not prompt for password either, so I think I'm already root. I also tried exec ./ to no avail.

Last edited by KaliBob; 11-14-2013 at 03:57 PM.
Old 11-14-2013, 04:04 PM   #2
LQ Newbie
Registered: Nov 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Also, I forgot to mention that in my terminal, root is the username I used during the OS install last night, it does not necessitate that I am in the system root. I'm probably going to have to change that to alleviate confusion.

Here is an external link to the screenshot of my issue if this makes it easier to read, since I can not yet attach them here directly.
Old 11-14-2013, 06:20 PM   #3
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,126

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
You didn't post the script so we have no way of knowing what the contents are. What does line 38 look like, where the error is reported?
Old 11-14-2013, 09:43 PM   #4
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 317

Rep: Reputation: 123Reputation: 123
Originally Posted by KaliBob View Post
root@kali:~# /usr/local/src/Tether/linux/adb
bash: /usr/local/src/Tether/linux/adb: No such file or directory
You must have a filename containing a space or an unprintable character.

I made a directory with four files that look the same:
$ mkdir erase-me
$ cd erase-me
$ ls
$ touch "adb"
$ touch "  adb "
$ touch " adb  "
$ touch "adb "
$ ls
adb    adb    adb    adb
$ ls -1b    # 1=one entry per line, b=backslash before any nongraphic character
\ \ adb\
\ adb\ \
$ ls -1Q    # 1=one entry per line, Q=double quotes around each entry
"  adb "
" adb  "
"adb "
$ ls | hexdump -C    # hexdump tells all
00000000  61 64 62 0a 20 20 61 64  62 20 0a 20 61 64 62 20  |adb.  adb . adb |
00000010  20 0a 61 64 62 20 0a                              | .adb .|
Try these three ls commands to see what your filename really is.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
su:warning: cannot change directory to home/orausr: No such file or directory cdhar Linux - Newbie 4 09-11-2012 06:17 AM
chroot:cannot change root directory to: No such file directory janakiramulu Linux From Scratch 5 04-23-2011 01:00 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration