How to install Ubuntu SDK quickly

Source: Internet
Author: User

I have described in detail how to install the Ubuntu SDK in the previous article "Ubuntu SDK Installation". However, many developers may fail at the end of the chroots required to install the SDK. The reason for this is that when installing chroots, it does not support the continuation of a breakpoint. That is, when installing chroots, because of the network or for some reason, caused the installation of Chroots failed, we need to reinstall it again. In general we need to remove existing chroots that have failed to install. This article explains in detail how to quickly install our Ubuntu SDK.


1) Install Ubuntu SDK

First of all, we can install our Ubuntu desktop System. We generally recommend installing the latest Ubuntu desktop systems, such as the 16.04 LTS version, which is currently coming soon. If you already have an Ubuntu desktop system, we can upgrade our desktop system to the latest system with the following commands:

$ update-manager-d

Install the latest Ubuntu SDK, as described in the existing article "Ubuntu SDK installation."

$sudo apt-get update$sudo apt-get upgrade$sudo apt-get dist-upgrade$sudo add-apt-repository ppa:ubuntu-sdk-team/ppa$ sudo apt-get install UBUNTU-SDK

In the first command above, we first update our Ubuntu desktop system to the latest state, so that our latest SDK-dependent packages are installed in the system so that the installation of the later SDK can proceed smoothly. No side in our actual installation, if the package is not in the system or the latest, then the installation of the subsequent SDK may fail.

In this step, since we used the PPA, all of it can support the continuation of the breakpoint. If it fails, it can continue downloading the installation again at the next installation, from where it was last interrupted. Generally speaking, we are not worried about the failure of this step. After a successful installation, we can find the Ubuntu SDK we need in the dash:



for developers who are not very good on the Internet , please skip to the third section below to download the chroots that have been successfully installed without the need for the second step below.


2) Install Chroots
In this step, because it does not support the continuation of the breakpoint, all of it is the most likely to cause the installation failure of the link. If our network is in good condition, we can install our chroots by entering the following command directly from our command line. In this step, we can install the version of Chroots that we need. We can find all the supported frameworks for our phones in the following ways:
[Email protected]:~$ adb shell[email protected]:~$ Click Framework List



In general, when we develop, we will choose the framework we need (equivalent to iOS version). If the framework we define does not exist in the phone, then my app will not be able to be run on the phone. Currently we recommend the use of 15.04 chroot.
-Installation of ARMHF chroot
We can install our ARMHF chroot by the following command:
$sudo Click Chroot-aarmhf-f ubuntu-sdk-15.04 Create  
If the installation fails, we must use the following command to remove the installed semi-finished products, and then use the above command to install our chroot.
$sudo Click Chroot-a armhf-f ubuntu-sdk-15.04  Destroy   

-Installation of I386 chroot
We can install our ARMHF chroot by the following command:
If the installation fails, we must use the following command to remove the installed semi-finished products, and then use the above command to install our chroot.

3) directly download the existing chroots for installation
In the actual installation, I found that there are a lot of developers in the above installation because of the network causes the above installation will not be successful. For this reason, we have already successfully installed the Chroots uploaded to our Baidu network for everyone to download. When the download is complete, we'll unzip them into the path we need. The advantage of this installation is that we can use various methods for breakpoints to download our packaged chroots and successfully copy it to the appropriate directory. The disadvantage of this approach is that chroots may not be up to date. Developers can update our chroots automatically or manually in future SDKs. In general, however, this chroots is sufficient even in the case of non-renewal.
Remove any chroots that have not been installed or installed successfully
We can remove chroots that have not been successfully installed by the method described in the previous section.
$sudo Click Chroot-a armhf-f ubuntu-sdk-15.04  destroy $sudo click Chroot-a i386-f ubuntu-sdk-15.04  Destroy  
Through the above method, we make sure that there are no chroots files in our desktop system after we have failed to install
Download the chroots we uploaded
Developers can download the chroots we have uploaded to our website. This chroots is the latest chroot to upload time. There should be no problem with the vast majority of application development. Of course, developers can update them later in the SDK.


As we have shown above. In our last chroots, there were two parts of the file.
-CHROOT.D:
This is a file that needs to be installed in the/ETC/SCHROOT/CHROOT.D directory. The file schema after installation is:
[Email protected]:/etc/schroot/chroot.d$ tree.├──click-ubuntu-sdk-15.04-armhf└──click-ubuntu-sdk-15.04-i386
In the actual copy, we need to use sudo to copy the method of these two files. The LIUXG here is the user name on my own computer liuxg. In your own installation, this name should be your own user name. To open this two file, also we need to use sudo to edit these two files, such as CLICK-UBUNTU-SDK-15.04-ARMHF:
[Click-ubuntu-sdk-15.04-armhf]description=build chroot for click Packages on Armhfusers=root,liuxgroot-users=root, liuxgsource-root-users=root,liuxgtype=directoryprofile=defaultsetup.fstab=click/fstab# not protocols or services see# Debian Bug 557730setup.nssdatabases=sbuild/nssdatabasesunion-type=overlayfsdirectory=/var/lib/schroot/ Chroots/click-ubuntu-sdk-15.04-armhf

We can use VI or gedit to edit the above file. Replace the "Liuxg" above with the user name on your computer. and save them. We use the same method to do the same for click-ubuntu-sdk-15.04-i386.
-Chroots.tar.gz
We'll copy this file to the/var/lib/schroot/directory, and then we'll unzip it in the following way:
[Email protected]:/var/lib/schroot/chroots$ sudo tar-xvf chroots.tar.gz
The file schema after the antidote is:
[Email protected]:/var/lib/schroot/chroots$ tree-l 1.├──click-ubuntu-sdk-15.04-armhf└── Click-ubuntu-sdk-15.04-i386

The same above "Liuxg" is my own user name. In practice, it should be a user name on your own computer.
-Check the chroots we have installed
We can check whether the installation of our chroots has been successful by the following methods:
[Email protected]:~$ schroot-lchroot:click-ubuntu-sdk-15.04-armhfchroot:click-ubuntu-sdk-15.04-i386source: Click-ubuntu-sdk-15.04-armhfsource:click-ubuntu-sdk-15.04-i386

If we have seen the above display, it indicates that our installation has been successful.
-Open our Ubuntu SDK to check our Chroots
In the SDK, how do we check if the chroots we have installed has been successful? We first open our SDK and then click on the menu: Tools==> Options==> Ubuntu==> Click

If we have seen our chroot already shown in the picture above, it shows that our chroot has been successfully installed. We can click on the above UpdateTo update our chroots to the latest status. Of course we can also click MaintainTo add or remove the modules or libraries we need.

-Check the Ubuntu SDK we have installed
We can check the success of our SDK installation through the article "Create your first Ubuntu for phone app". If all goes well, we can deploy our application to our devices or simulators. For specific installation of the simulator, you can refer to the article "Ubuntu SDK Installation". This will not be repeated here.

How to install Ubuntu SDK quickly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.