查看: 1666|回复: 0

[教程] 【一网打尽】Raspberry Pi Course Week 5 – Day 2 (Managing software pac...

[复制链接]
  • TA的每日心情
    开心
    2016-8-4 10:56
  • 签到天数: 242 天

    连续签到: 1 天

    [LV.8]以坛为家I

    发表于 2015-3-28 12:58:54 | 显示全部楼层 |阅读模式
    分享到:

    Adding software to your Raspberry Pi can be achieved in two ways.  You can use the command line tool apt-get or you can use a graphical interface to select what needs to be installed.  The apt tool or Advanced PackagingTool is great because it provides a quick and easy way to add, remove and update programs.  Enter the following command to install a program called wget.  This program is used to download files from the internet using the command line.

    $ sudo apt-get install wget

    Enter the root password and confirm that you want to install the program.  After a few minutes the program will display its progress and where it is downloading the program from.   If wget is already installed your will receive the following message.

                    wget is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 238 not upgraded.

    Confirm that wget is installed by entering

    $ wget

    If everything has been installed correctly, you will be presented with the version information for wget.

           wget: missing URL

                    Usage: wget [OPTION]… [URL]…

                    Try `wget –help’ for more options.

    You can also install multiple packages at once using the following

    $ sudo apt-get install wget vsftp

    If you are not sure of the program that you want to install you can always use the apt-cache utility to search for a program.  The apt-cache utility is specifically designed for searching the software package cache.  The software package cache contains a list of existing software that is available for the Raspberry Pi.  Enter the following command.

    $ sudo apt-cache search wget

    Apt will return a list of matches related to wget.

    The list of software packages needs to be kept up to date by comparing packages on your system with a remote database of updates, newly added packages and out of date packages.  The following command is used to resynchronise the package index file.

    $ sudo apt-get update

    Enter the root password and the Raspberry Pi will obtain a list of package updates.   These updates come from a number of sources online which are listed in the following file.

    /etc/apt/sources.list

    Enter the following to take a look at this file.

    $ cat /etc/apt/sources.list

    In this file you can see references to ftp and http locations which are used to obtain the software.

    Deleting a package follows a similar process to the installation procedure.  Simply enter

    $ sudo apt-get remove wget

    In this example the wget package is being removed but you can remove any package by entering its name.


    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /4 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-11-19 13:24 , Processed in 0.113672 second(s), 15 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.