Although Native Client modules are platform independent, the instructions for installing and building Native Client differ a bit between platforms. This page has details about the Linux environment.
For instructions on installing and using Native Client, see Getting Started. That page and others, such as Building Native Client, link to this page as needed.
Native Client has been tested with the following Linux configurations:
On Debian-based distributions such as Ubuntu, you can use the following command to get Python 2.4:
sudo apt-get install python2.4
Or use Synaptic (sudo synaptic)
for a friendlier interface to APT.
You can also download Python from http://www.python.org/download/.
The path to python must have no spaces.
You can use the which command
to see the path:
$ which python /usr/bin/python
Native Client works best in 32-bit browsers. For instructions on using a 32-bit browser on a 64-bit Linux system, search for [linux 32-bit 64-bit browser].
An alternative is to use NSPluginWrapper (version 1.1.2 or newer), which makes the Native Client plug-in work in 64-bit browsers. Here's an example of the command you'd use:
/usr/bin/nspluginwrapper -i ~/.mozilla/plugins/libnpGoogleNaClPlugin.so
You might have to rerun that command when you install a new version of the plug-in.
Note: Avoid NSPluginWrapper if you need to run modules that depend on NPAPI. The performance impact of NSPluginWrapper's NPAPI forwarding can be huge.
If you're using a 32-bit system and not building the SDK, you shouldn't have to do anything to set up your environment, thanks to the software that comes with most Linux systems.
To build the SDK,
you need texinfo.
On Debian-based distributions such as Ubuntu,
you can get texinfo
with the following command:
sudo apt-get install texinfo
If you're using a 64-bit system, you need to run a prep script.
To build on 64-bit Linux, you first need to run the prep script. Run this script every time you download a new version of Native Client. (You could get away with running the script just once, but if the script changes, you should run it again.) Here's how to run the script:
cd install_dir/build/native_client/tools ./linux.x86_64.prep.sh
Note:
The script is Ubuntu-specific —
using apt-get and Ubuntu file locations, for example.
It might not work
if you have another distribution of Linux.
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution 2.5 license.