Hitchhiker's Guide to Openbsd


Using pkg_add(1) in interactive mode


Download 1.27 Mb.
Pdf ko'rish
bet240/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   236   237   238   239   240   241   242   243   ...   258
Bog'liq
obsd-faq49

Using pkg_add(1) in interactive mode
Since OpenBSD 3.9, pkg_add(1) has an interactive mode, which is enabled by invoking it with the -i 
flag, and which causes it to ask you questions when it cannot make decisions by itself. For example, if 
you don't know the version number of a package beforehand, you can try something like: 
sudo pkg_add -i screen
Ambiguous: screen could be screen-4.0.3p1 screen-4.0.3p1-
shm screen-4.0.3p1-static
Choose one package
0:
1: screen-4.0.3p1
2: screen-4.0.3p1-shm
3: screen-4.0.3p1-static
Your choice: 1
screen-4.0.3p1: complete
For some packages, some important additional information will be given about the configuration or use 
of the application on an OpenBSD system. Since it is important, it will be displayed whether or not you 
use the -v flag. Consider the following example: 
sudo pkg_add ghostscript-fonts-8.11
ghostscript-fonts-8.11: complete
You may wish to update your font path for /usr/local/share/
ghostscript/fonts
--- ghostscript-fonts-8.11 -------------------
To install these fonts for X11, just make sure that the 
fontpath
lists the 75dpi or 100dpi bitmap fonts before the 
http://www.openbsd.org/faq/faq15.html (5 of 27)9/4/2011 10:02:29 AM


15 - The OpenBSD packages and ports system
ghostscript fonts,
and make sure you have the string ":unscaled" appended to 
the bitmap
font's fontpath. This way, the bitmap fonts will be used if 
they
match, and the Type 1 versions will be used if the font 
needs to be
scaled. Below is the relevant section from a typical xorg.
conf file.
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/local/lib/X11/fonts/ghostscript/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
Let us now continue with an example of a package which has dependencies: 
sudo pkg_add -v tin-1.8.2p0
parsing tin-1.8.2p0
Dependencies for tin-1.6.2 resolve to: gettext-0.14.6, 
libutf8-0.8, pcre-6.4p1, libiconv-1.9.2p3 (todo: libiconv-
1.9.2p3,gettext-0.14.6,pcre-6.4p1,libutf8-0.8)
tin-1.8.2p0:parsing libiconv-1.9.2p3
tin-1.8.2p0:libiconv-1.9.2p3: complete
tin-1.8.2p0:parsing gettext-0.14.6
Dependencies for gettext-0.14.6 resolve to: expat-2.0.0, 
libiconv-1.9.2p3 (todo: expat-2.0.0)
tin-1.8.2p0:parsing expat-2.0.0
tin-1.8.2p0:expat-2.0.0: complete
tin-1.8.2p0:gettext-0.14.6: complete
tin-1.8.2p0:parsing pcre-6.4p1
tin-1.8.2p0:pcre-6.4p1: complete
tin-1.8.2p0:parsing libutf8-0.8
tin-1.8.2p0:libutf8-0.8: complete
tin-1.8.2p0: complete
Again we added the -v flag to see more of what is happening. Upon investigating the packing 
information, dependencies are found and they are installed first. Somewhere in the middle you can see 
the gettext package being installed, which depends on libiconv. Before installing gettext, its packing 
information is examined and it is verified whether libiconv has already been installed. 
It is possible to specify multiple package names on one line, which then all get installed at once, along 
http://www.openbsd.org/faq/faq15.html (6 of 27)9/4/2011 10:02:29 AM


15 - The OpenBSD packages and ports system
with possible dependencies. 
If for some reason you decide not to use 
PKG_PATH
, it is also possible to specify the absolute location 
of a package on the command line. This absolute location may be a local path, or a URL referring to 
FTP, HTTP, or SCP locations. Let's consider installation via FTP in the next example: 
sudo pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.9/

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   236   237   238   239   240   241   242   243   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling