LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-29-2011, 11:14 AM   #1
snfo
LQ Newbie
 
Registered: Mar 2011
Location: Ky
Distribution: Ubuntu 11.04
Posts: 2

Rep: Reputation: 0
Anyone know what causes this?


Hello everyone. I am no stranger to the shell or anything like that, but I just had never come across this behavior before.

I keep a backup of a bunch of files on a flash drive, so that whenever I change distributions I can just restore all my Android stuff (saves on re-downloading everything). One of these is the Android SDK.

In my ~/.bashrc I add the paths to some executables in the SDK, only if the directory exists, and only if the path is not already in $PATH. For the Android NDK this works fine, but for the SDK I get this:
Code:
snfo@snfo:~$ adb devices
bash: /home/snfo/Android/sdk/platform-tools/adb: No such file or directory
snfo@snfo:~$ ls -F /home/snfo/Android/sdk/platform-tools/adb
/home/snfo/Android/sdk/platform-tools/adb*
Everything else is fine though, just that one path is causing trouble.

Now, I've saw something similar to this before whenever you move an executable from one place to another. If you don't re-source your bash config it will continue to keep looking wherever it used to be located. But I've never moved these files. Kinda weird.

Anyway, any suggestions on this would be appreciated.
 
Old 04-29-2011, 11:45 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Try ldd /home/snfo/Android/sdk/platform-tools/adb |grep found

Install whatever shows. The correct answer is no output.
 
Old 04-29-2011, 11:50 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

the only occasion I have observed such behavior is when the executable cannot find its linker. Are you able to run the binary when you call it with full path?
What is the output of
Code:
ldd /home/snfo/Android/sdk/platform-tools/adb
[EDIT]
As already suggested by business kid ...
 
Old 04-29-2011, 01:18 PM   #4
snfo
LQ Newbie
 
Registered: Mar 2011
Location: Ky
Distribution: Ubuntu 11.04
Posts: 2

Original Poster
Rep: Reputation: 0
You guys are right. For some reason it was acting like the binary was not compatible with my system, even though it was the official binary from developer.android.com.

I fixed this by re-compiling adb on my machine.
 
  


Reply



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 On
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:17 PM.

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