Compile Android under Ubuntu to find the problem solved by the head file
When compiling Android under Ubuntu, I found a compilation error, some header files could not be found, such as:
Fatal error: Alsa/asoundlib.h: no file or directory
Online search, because some libraries are not installed caused.
You can use Apt-file to see what library the header file is in, locate the appropriate library, and install it.
Install Apt-file:
sudo apt-get install Apt-file
Find header files:
Apt-file Search header files, such as:
Apt-file Search Alsa/asoundlib.h
Find the following results:
Libasound4-dev:/usr/include/alsa/asoundlib.h
Install Libasound4-dev:
sudo apt-get install Libasound4-dev
The following errors are indicated when installing some libraries:
Errors cannot be corrected because you require certain packages to remain threaded, or they break the dependencies between packages.
Online Check the next, said to delete some sources, and then update, you can fix.
The source in my machine has not changed, so I do not know to delete those.
Manually check for updates and perform updates.
Then execute the sudo apt-get update again.
Reinstall the package again, or you have the same error.
Some people say you need to check Update Manager, settings (software source), update "Recommended Updates", open my, look at, have been selected.
But "Unsupported Updates" is also selected, kill this.
Then, in the Ubuntu software, settings (software source), Update Manager, switch "Download from" from "Chinese server" to "master server".
Back to the update Manager, re-check again, and indeed some things need to be updated to perform the update.
Then go to the command line to execute:
sudo apt-get update
Seemingly also downloaded some things, although not much.
In front of the answer, go to install the library, found OK.
It is estimated that I installed the Chinese version, so the update source is downloaded from "Chinese server" by default.
Compile Android under Ubuntu to find the problem solved by the head file