个人工具

UbuntuHelp:Synaptic/PackageDownloadScript

来自Ubuntu中文

Wikibot讨论 | 贡献2008年5月9日 (五) 19:23的版本 (新页面: {{From|https://help.ubuntu.com/community/Synaptic/PackageDownloadScript}} {{Languages|UbuntuHelp:Synaptic/PackageDownloadScript}} Start Synaptic Package Manager (S...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

Start Synaptic Package Manager (SPM). Mark all the applications that you want to install/upgrade in the usual way. After that, instead of clicking the “Apply” button from the toolbar as you would normally do, go to the File menu and select “Generate Package Download Script” menu option to generate the download script. A dialog box will prompt to save the generated script file. Give it a name like ‘ubuntu.sh’ and click the “Save” button. This script file needs to be carried to a machine which has a fast Internet connection and it needs to be executed there.

Downloading

You can download or save the files to a USB keydrive

Downloading in Windows

The first line need to be removed if the script is to be run on a Windows machine.

Ubuntu Live CD

You can boot the Ubuntu Live CD and run the ‘ubuntu.sh’ script in a terminal. This can be impractical if you has no administrator´s permissions to access to the Internet using the Live CD.

Windows Wget way

The first line need to be removed if the script is to be run on a Windows machine and rename to file to ubuntu.bat You can use Wget for Windows. Don´t forget set the path to the folder where wget.exe is. You can also put wget.exe in c:\wgetdir\ ( edit the script with a text editor and replace all references to wget with c:\wgetdir\wget )

HTML way

You can name the file ‘ubuntu.htm’ (instead of ‘ubuntu.sh’) and download the files manually (clicking in the links).

Metalink way

You can convert the ubuntu.htm to a metalink file.

Downloading in Linux

It will be convenient if the machine with fast Internet connection runs some flavour of GNU/Linux operating system with wget installed on it. Start a shell/command prompt, change to the directory where you want to store the files to downloaded and run the script as shown:

sh ubuntu.sh

An alternative way using the file manager (Nautilus), is to move the script to the directory where you want to store the files to dowload and click in the script file (ubuntu.sh)

Installation

Once the downloads are finished, carry all the downloaded files to the Ubuntu machine and copy them to a new folder(say ‘Downloads’) in the home directory. Start Synaptic Package Manager again and select the same package(s) name(s) that you initially selected. Go to “Add Selected Packages” from the File menu and browse to the folder where you have copied the downloaded files(’Downloads’ folder in our example). Click “Apply” button from the toolbar. The packages will be installed from the local directory without the need to connect to the Internet.

See also