1. Description of the problem:
When you recently tested your Android environment, run the program and prompt for the following error message:
cannot run program error=2, without that file or directory ' while attempting to get ADB.
Operating environment is Unbuntu 14.04 64-bit system;
2. Cause of the problem:
When searching for answers online, the reason for the problem was found: because the system is 64-bit, and the Android SDK has only 32bit programs. So there is this incompatibility problem, missing some libraries that the SDK runs.
3. Solution:
Many of the software is only 32-bit, there are many more rely on 32-bit libraries, in Unbuntu 12.04 and previous versions can be directly used in the command: Install the Ia32-libs library
but since Unbuntu 13.10 has been abandoned ia32-libs, but we can still use multi-frame: Open the Unbuntu 32-bit support function;
First, confirm whether it is a 64-frame kernel; Open Terminal input
Dpkg--print-architecture
AMD 64 is shown, 64-bit architecture core is indicated
Then, confirm that the multi-frame support feature is turned on, and multi-frame support allows you to use a 32-bit library in 64-bit libraries.
In Terminal input:
Dpkg--print-foreign-architectures
The display is i386, indicating that the multi-frame support function has been opened;
Show other instructions do not open this function, we will open the multi-frame support function;
In Terminal input:
sudo dpkg--add-architecture i386 sudo apt-get update
The update will then be downloaded and then run.
Then enter:
sudo apt-get dist-upgrade
Check if the owning library file has an updated version.
If so, you will be prompted if you need an update (y/n).
This allows us to implement multi-frame support capabilities.
Back to the problem I encountered above, after opening the multi-frame support function, we will install Lib32z1-dev (compile the files needed by Android, see the online answer)
In the terminal, enter:
sudo apt-get install Lib32z1-dev
after putting everything in place and running it again, it seems like the problem was solved, but another problem arose:
Adb:error while loading shared libraries:libstdc++.so.6:cannot open share
Here seems to be missing libstdc++.so.6: This shared library, find the answer on the net, is missing lib32stdc++6 This package, we install this package directly.
sudo apt-get install lib32stdc++6
after the installation is complete, after re-running, it is found that there is no above two problems, indicating that the problem has been resolved.
4. Problem-harvesting ;
In the process of solving this problem, in the online access to a lot of information, in the process of accessing the information found a very useful tool apt-file,
By default Unbuntu does not install this tool and requires root access when installing this tool.
In the terminal, enter:
Apt-get Install Apt-file
Update the cache every time before use to ensure that the data is up-to-date :
Apt-file Update
The feature of this tool is that it can be created in the system based on the working mechanism of APT, with a specific file name as a parameter to query which packages will accompany the installation of the file.
For example, let's say that if the system installs some software that fails to prompt for the missing example.so library file, it can be executed (refer to http://www.guokr.com/blog/749085/)
Apt-file Search example.so
The command returns the following information:
Example:/usr/lib/example.so
The return information indicates that the installation of the example package creates a example.so file in the/usr/lib/directory. The next step is to install the example package to resolve dependencies.
Apt-get Install Example
This shows that this tool is simply to solve the dependence of the weapon Ah!
Linux Learning (vi) Ubuntu14.04 (64-bit) Configure Android Environment error (... adb ": error=2, no file or directory) solution