1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755
|
<!doctype debiandoc system>
<debiandoc>
<book>
<title>APT HOWTO</title>
<author>
<name>Gustavo Noronha Silva</name> <email>kov@debian.org</email>
</author>
<author>
A
<email>costas@step.gr</email>
</author>
<version>1.8.5 - July 2003</version>
<abstract>
,
Debian,
APT.
Debian
.
Debian, ,
.
</abstract>
<copyright>
<copyrightsummary>
Copyright © 2001, 2002 Gustavo Noronha Silva
</copyrightsummary>
<copyrightsummary>
© 2003
</copyrightsummary>
<p>
GNU FDL (Free Documentation
License).
.
</copyright>
<toc>
<chapt>
<p>
.tar.gz.
GNU/Linux.
Debian,
.
<prgn>dpkg</prgn>. `'
GNU/Linux, Red Hat , ,
`rpm'.
<p>
GNU/Linux.
, ,
, ,
. , Debian
, APT, Advanced
Packaging Tool, Conectiva rpm
.
<p>
apt-rpm, APT Conectiva
"" ,
<p>
Debian, <tt>Sarge</tt>.
</chapt>
<chapt id="basico">
<sect id="sources.list"> /etc/apt/sources.list
<p>
, APT ,
'', .
<tt>/etc/apt/sources.list</tt>.
<p>
:
<p>
<example>
deb http://host/debian distribution section1 section2 section3
deb-src http://host/debian distribution section1 section2 section3
</example>
<p>
. , <tt>deb</tt> <tt>deb-src</tt>
:
(<tt>deb</tt>), ,
(<tt>deb-src</tt>),
, Debian (<tt>.dsc</tt>)
<tt>diff.gz</tt> ,
Debian.
<p>
sources.list Debian:
<p>
<example>
# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
# Uncomment if you want the apt-get source function to work
#deb-src http://http.us.debian.org/debian stable main contrib non-free
#deb-src http://non-us.debian.org/debian-non-US stable/non-US
</example>
<p>
Debian.
<tt>deb</tt> ,
Debian.
<p>
( '#' ),
apt-get . <tt>deb-src</tt>,
Debian.
,
'#' .
<p>
<tt>/etc/apt/sources.list</tt>
. APT <tt>http</tt>,
<tt>ftp</tt>, <tt>file</tt> ( ..
ISO9660) <tt>ssh</tt>, ` .
<p>
<tt>apt-get update</tt>
<tt>/etc/apt/sources.list</tt>.
APT
.
</sect>
<sect id="dpkg-scanpackages"> APT
<p>
.deb,
APT, .
<p>
,
.deb, . :
<p>
<example>
# mkdir /root/debs
</example>
<p>
<tt></tt>.
,
. :
<p>
<example>
package priority section
</example>
<p>
package ,
(low), (medium) (high) section
. ,
<prgn>dpkg-scanpackages</prgn> .
<tt></tt>,
<file>/dev/null</file> <prgn>dpkg-scanpackages</prgn>.
<p>
/root :
<p>
<example>
# dpkg-scanpackages debs <var>file</var> | gzip > debs/Packages.gz
</example>
<p>
<var>file</var> <tt></tt>.
<file>Packages.gz</file>
, APT.
, ( sources.list):
<p>
<example>
deb file:/root debs/
</example>
<p>
, APT .
.
, ,
<tt>.orig.tar.gz</tt>, <tt>.dsc</tt> <tt>.diff.gz</tt>
<tt>Sources.gz</tt> <tt>Packages.gz</tt>.
.
<prgn>dpkg-scansources</prgn>.
:
<p>
<example>
# dpkg-scansources debs | gzip > debs/Sources.gz
</example>
<p>
<prgn>dpkg-scansources</prgn>
<tt></tt>. sources.list :
<p>
<example>
deb-src file:/root debs/
</example>
</sect>
<sect id="netselect"> sources.list: netselect, netselect-apt
<p>
, , , :
" Debian <tt>sources.list</tt>;".
.
ping
mirrors. :
<strong>netselect</strong>.
<p>
netselect, :
<p>
<example>
# apt-get install netselect
</example>
<p>
, .
,
.
ping hops (
) ''
( ).
(
-vv). : <p>
<example>
# netselect ftp.debian.org http.us.debian.org ftp.at.debian.org download.unesp.br ftp.debian.org.br
365 ftp.debian.org.br
#
</example>
<p>
,
netselect, <tt>ftp.debian.org.br</tt> , 365.
(!!
,
).
<p>
, mirror netselect
<tt>/etc/apt/sources.list</tt> ( <ref id="sources.list">)
<ref id="apt-get">.
<p> <strong>:</strong> mirrors
<url id="http://www.debian.org/mirror/mirrors_full"
name="http://www.debian.org/mirror/mirrors_full">.
<p>
0.3, netselect
<strong>netselect-apt</strong>,
. distribution tree (
stable) <tt>sources.list</tt>
mirrors .
sources.list :
<p>
<example>
# ls sources.list
ls: sources.list: File or directory not found
# netselect-apt stable
(...)
# ls -l sources.list
sources.list
#
</example>
<p>
<strong>:</strong> sources.list
<tt>/etc/apt</tt>.
<p>
, <ref id="apt-get">.
</sect>
<sect id="cdrom"> CD-ROM sources.list
<p>
CD-ROM
APT, <tt>sources.list</tt>.
,
<prgn>apt-cdrom</prgn> :
<p>
<example>
# apt-cdrom add
</example>
<p>
CD-ROM Debian . CD-ROM
CD Debian .
CD-ROM ,
:
<p>
<example>
-h - program help
-d directory - CD-ROM mount point
-r - Rename a recognized CD-ROM
-m - No mounting
-f - Fast mode, don't check package files
-a - Thorough scan mode
</example>
<p>
:
<p>
<example>
# apt-cdrom -d /home/kov/mycdrom add
</example>
<p>
CD-ROM, :
<p>
<example>
# apt-cdrom ident
</example>
<p>
CD-ROM
<tt>/etc/fstab</tt> .
</sect>
</chapt>
<chapt id="apt-get">
<sect id="update">
<p>
,
. <prgn>apt-get</prgn>
.
<p>
,
<prgn>apt-get update</prgn>.
<tt>/etc/apt/sources.list</tt>
<ref id="sources.list"> .
<p>
, .
</sect>
<sect id="install">
<p>
, ! sources.list
<tt>apt-get</tt>
. , :
<p>
<example>
# apt-get install xchat
</example>
<p>
APT
<tt>sources.list</tt>.
-- -- APT
. :
<p>
<example>
# apt-get install nautilus
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
bonobo libmedusa0 libnautilus0
The following NEW packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
0 packages upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 8329kB of archives. After unpacking 17.2MB will be used.
Do you want to continue? [Y/n]
</example>
<p>
<package>nautilus</package>
, APT .
<tt>apt-get</tt>, APT
.
<p>
APT
.
<p>
apt-get :
<p>
<example>
-h This help text.
-d Download only - do NOT install or unpack archives
-f Attempt to continue if the integrity check fails
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-u Show a list of upgraded packages as well
</example>
<p>
.
''
<tt>/var/cache/apt/archives</tt> .
<p>
,. '-'
, :
<p>
<example>
# apt-get install nautilus gnome-panel-
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
bonobo libmedusa0 libnautilus0
The following packages will be REMOVED:
gnome-applets gnome-panel gnome-panel-data gnome-session
The following NEW packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
0 packages upgraded, 4 newly installed, 4 to remove and 1 not upgraded.
Need to get 8329kB of archives. After unpacking 2594kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
<ref id="remove"> .
<p>
,
<tt>--reinstall</tt> :
<p>
<example>
# apt-get --reinstall install gdm
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0B/182kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n]
</example>
<p>
APT 0.5.3,
`unstable' (<tt>sid</tt>) .
,
:
<tt>apt-get install package/distribution</tt>
, <tt>apt-get install package=version</tt>.
:
<p>
<example>
# apt-get install nautilus/unstable
</example>
<p>
nautilus `unstable'
`stable'. 'distribution'
<tt>stable</tt>, <tt>testing</tt>, <tt>unstable</tt>.
<p>
<tt>-t</tt>
, <prgn>apt-get</prgn>
.
<p>
<em>ʼ</em>: `unstable' Debian
.
,
.
<em></em>
.
<p>
`testing'
`unstable' ,
stable.
</sect>
<sect id="remove">
<p>
,
APT. :
<tt>apt-get remove package</tt>.
:
<p>
<example>
# apt-get remove gnome-panel
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
gnome-applets gnome-panel gnome-panel-data gnome-session
0 packages upgraded, 0 newly installed, 4 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 14.6MB will be freed.
Do you want to continue? [Y/n]
</example>
<p>
, APT
.
APT
.
<p>
<prgn>apt-get</prgn>, ,
, , .
, :
<p>
<example>
# apt-get --purge remove gnome-panel
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
gnome-applets* gnome-panel* gnome-panel-data* gnome-session*
0 packages upgraded, 0 newly installed, 4 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 14.6MB will be freed.
Do you want to continue? [Y/n]
</example>
<p>
'*' .
.
<p>
<tt>install</tt>,
<tt>remove</tt>
. ,
<tt>'+'</tt> ,
.
<p>
<example>
# apt-get --purge remove gnome-panel nautilus+
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
The following packages will be REMOVED:
gnome-applets* gnome-panel* gnome-panel-data* gnome-session*
The following NEW packages will be installed:
bonobo libmedusa0 libnautilus0 nautilus
0 packages upgraded, 4 newly installed, 4 to remove and 1 not upgraded.
Need to get 8329kB of archives. After unpacking 2594kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
<prgn>apt-get</prgn>
(,
),
, (
).
</sect>
<sect id="upgrade">
<p>
APT.
: <tt>apt-get upgrade</tt>.
, ,
<tt>apt-get dist-upgrade</tt>
<ref id="dist-upgrade"> .
<p>
<tt>-u</tt>.
APT
. , . APT
''
. <tt>apt-get update</tt>
. <ref id="update">.
:
<p>
<example>
# apt-get -u upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back
cpp gcc lilo
The following packages will be upgraded
adduser ae apt autoconf debhelper dpkg-dev esound esound-common ftp indent
ipchains isapnptools libaudiofile-dev libaudiofile0 libesd0 libesd0-dev
libgtk1.2 libgtk1.2-dev liblockfile1 libnewt0 liborbit-dev liborbit0
libstdc++2.10-glibc2.2 libtiff3g libtiff3g-dev modconf orbit procps psmisc
29 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 5055B/5055kB of archives. After unpacking 1161kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
. ,
<tt>apt-get</tt> <tt>kept back</tt>.
,
.
(
) (
).
<p>
. ,
<tt>apt-get install</tt> ,
.
<tt>dist-upgrade</tt>. <ref id="dist-upgrade">.
</sect>
<sect id="dist-upgrade">
<p>
APT
Debian ' , Internet CD
( ISO image).
<p>
. <tt>apt-get upgrade</tt>,
(<tt>kept back</tt>).
<p>
, 0
Debian CD 3.
APT CD.
, <prgn>apt-cdrom</prgn> (
<ref id="cdrom">) CD
<tt>/etc/apt/sources.list</tt>
<tt>apt-get dist-upgrade</tt>.
<p>
APT
. , <tt>/etc/apt/sources.list</tt>
CD, APT .
<p>
<ref id="upgrade">,
<tt>kept back</tt>.
<tt>dist-upgrade</tt>:
<p>
<example>
# apt-get -u dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following NEW packages will be installed:
cpp-2.95 cron exim gcc-2.95 libident libopenldap-runtime libopenldap1
libpcre2 logrotate mailx
The following packages have been kept back
lilo
The following packages will be upgraded
adduser ae apt autoconf cpp debhelper dpkg-dev esound esound-common ftp gcc
indent ipchains isapnptools libaudiofile-dev libaudiofile0 libesd0
libesd0-dev libgtk1.2 libgtk1.2-dev liblockfile1 libnewt0 liborbit-dev
liborbit0 libstdc++2.10-glibc2.2 libtiff3g libtiff3g-dev modconf orbit
procps psmisc
31 packages upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/7098kB of archives. After unpacking 3118kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
,
( ).
lilo <tt>kept back</tt>.
. :
<p>
<example>
# apt-get -u install lilo
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
logrotate mailx
The following packages will be REMOVED:
debconf-tiny
The following NEW packages will be installed:
cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
logrotate mailx
The following packages will be upgraded
lilo
1 packages upgraded, 9 newly installed, 1 to remove and 31 not upgraded.
Need to get 225kB/1179kB of archives. After unpacking 2659kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
, lilo
<package>debconf-tiny</package>,
( ) debconf-tiny.
<p>
:
<p>
<example>
# apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Starting
Starting 2
Investigating python1.5
Package python1.5 has broken dep on python1.5-base
Considering python1.5-base 0 as a solution to python1.5 0
Holding Back python1.5 rather than change python1.5-base
Investigating python1.5-dev
Package python1.5-dev has broken dep on python1.5
Considering python1.5 0 as a solution to python1.5-dev 0
Holding Back python1.5-dev rather than change python1.5
Try to Re-Instate python1.5-dev
Done
Done
The following packages have been kept back
gs python1.5-dev
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
</example>
<p>
, python1.5-dev
, : python1.5.
</sect>
<sect id="clean"> : apt-get clean autoclean
<p>
APT hosts
/etc/apt/sources.list,
(<file>/var/cache/apt/archives/</file>),
, <ref id="install">.
<p>
. , APT
: <tt>clean</tt> <tt>autoclean</tt>
<tt>apt-get</tt>.
<p>
<prgn>apt-get clean</prgn>
<file>/var/cache/apt/archives/</file>
<file>/var/cache/apt/archives/partial/</file>. ,
, APT .
<p>
<prgn>apt-get autoclean</prgn>
.
<p>
apt-get autoclean:
<p>
<example>
# ls /var/cache/apt/archives/logrotate* /var/cache/apt/archives/gpm*
logrotate_3.5.9-7_i386.deb
logrotate_3.5.9-8_i386.deb
gpm_1.19.6-11_i386.deb
</example>
<p>
/var/cache/apt/archives
<package>logrotate</package> <package>gpm</package>.
<p>
<example>
# apt-show-versions -p logrotate
logrotate/stable uptodate 3.5.9-8
# apt-show-versions -p gpm
gpm/stable upgradeable from 1.19.6-11 to 1.19.6-12
</example>
<p>
<prgn>apt-show-versions</prgn>
<file>logrotate_3.5.9-8_i386.deb</file>
<package>logrotate</package>,
<file>logrotate_3.5.9-7_i386.deb</file> . ,
<file>gpm_1.19.6-11_i386.deb</file>
.
<p>
<example>
# apt-get autoclean
Reading Package Lists... Done
Building Dependency Tree... Done
Del gpm 1.19.6-11 [145kB]
Del logrotate 3.5.9-7 [26.5kB]
</example>
<p>, <tt>apt-get autoclean</tt> .
<ref id="apt-show-versions">
apt-show-versions.
</sect>
<sect id="dselect-upgrade"> APT dselect
<p>
<prgn>dselect</prgn>
Debian .
,
console-based ncurses .
<p>
dselect
Debian ""
. , <tt>dselect</tt>
root. 'apt' . ,
CD ROM
, dselect.
<p>
dselect,
dselect Debian
<url id="http://www.debian.org/doc/ddp" name="http://www.debian.org/doc/ddp">.
<p>
dselect, :
<p>
<example>
# apt-get -u dselect-upgrade
</example>
<p>
:
<p>
<example>
# apt-get -u dselect-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
lbxproxy
The following NEW packages will be installed:
bonobo console-tools-libs cpp-3.0 enscript expat fingerd gcc-3.0
gcc-3.0-base icepref klogd libdigest-md5-perl libfnlib0 libft-perl
libgc5-dev libgcc300 libhtml-clean-perl libltdl0-dev libsasl-modules
libstdc++3.0 metamail nethack proftpd-doc psfontmgr python-newt talk tidy
util-linux-locales vacation xbill xplanet-images
The following packages will be upgraded
debian-policy
1 packages upgraded, 30 newly installed, 1 to remove and 0 not upgraded.
Need to get 7140kB of archives. After unpacking 16.3MB will be used.
Do you want to continue? [Y/n]
</example>
<p>
apt-get dist-upgrade
:
<p>
<example>
# apt-get -u dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
debian-policy
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 421kB of archives. After unpacking 25.6kB will be freed.
Do you want to continue? [Y/n]
</example>
<p>
"". ( ..
lbxproxy)
dselect. dselect
APT.
</sect>
<sect id="default-version">
<p>
, ,
Debian
.
<p>
Debian
<file>/etc/apt/apt.conf</file>
:
<p>
<example>
APT::Default-Release "testing";
</example>
<p>
unstable,
<tt>-t</tt>:
<p>
<example>
# apt-get -t unstable install <var>packagename</var>
</example>
<p>
<file>/etc/apt/sources.list</file>.
<tt>testing</tt>
<tt>unstable</tt>.
</sect>
<sect id="apt-show-versions"> Debian
<p>
<prgn>apt-show-versions</prgn>
.
, ,
, apt-show-versions:
<p>
<example>
# apt-get install `apt-show-versions -u -b | grep unstable`
</example>
</sect>
<sect id="pin"> , ()
<p>
. , ,
Debian 3.0,
Debian 2.2. ''
.
<p>
.
<tt>/etc/apt/preferences</tt>.
<p>
:
<p>
<example>
Package: <package>
Pin: <pin definition>
Priority: <pin's priority>
</example>
<p>
, <package>sylpheed</package>
"reply-to-list" 0.4.99, :
<p>
<example>
Package: sylpheed
Pin: version 0.4.99*
</example>
<p>
<tt>*</tt> ().
"" ""
0.4.99. Debian
" Debian"
. , 0.4.99-1
0.4.99-10 .
.
<p>
<tt>Priority</tt> ,
989.
<p>
pin priorities.
0 .
0 100
. .
100
- ,
100.
<p>
100
. ,
. 100 1000
(inclusive) .
. , 0.5.3 sylpheed
'' sylpheed 0.4.99 999,
0.4.99 <em></em> ''.
""
1000.
<p>
<tt>version</tt>,
<tt>release</tt> <tt>origin</tt>
<p>
<tt>version</tt>,
<!-- what's available? standard shell globs? ?*[] or more? -->
<p>
<tt>release</tt> Release APT
CD.
.
Release <tt>/var/lib/apt/lists/</tt>.
:
<tt>a</tt> (archive), <tt>c</tt> (components), <tt>v</tt> (version),
<tt>o</tt> (origin) <tt>l</tt> (label).
<p>
:
<p>
<example>
Package: *
Pin: release v=2.2*,a=stable,c=main,o=Debian,l=Debian
Priority: 1001
</example>
<p>
, 2.2* Debian (
2.2r2, 2.2r3 --
),
<tt>stable</tt>, <tt>main</tt> (
<tt>contrib</tt> <tt>non-free</tt>) Debian.
(o=) ,
(l=) : Debian Debian Progeny
Progeny, . :
<p>
<example>
$ cat /var/lib/apt/lists/ftp.debian.org.br_debian_dists_potato_main_binary-i386_Release
Archive: stable
Version: 2.2r3
Component: main
Origin: Debian
Label: Debian
Architecture: i386
</example>
</sect>
</chapt>
<chapt id="helpers">
<sect id="equivs"> : equivs
<p>
,
, , Debian.
.
. , Debian
MTA (Mail Transport Agent).
, .
<p>
<package>equivs</package>.
, .
,
.
<p>
,
, , Debian
,
equivs .
<ref id="sourcehandling"> .
<p>
MTA.
<prgn>postfix</prgn>,
<package>mutt</package>.
<package>mutt</package> MTA.
.
<p>
(<file>/tmp</file>, ) :
<p>
<example>
# equivs-control <var>name</var>
</example>
<p>
<var>name</var>
. :
<p>
<example>
Section: misc
Priority: optional
Standards-Version: 3.0.1
Package: <enter package name; defaults to equivs-dummy>
Version: <enter version here; defaults to 1.0>
Maintainer: <your name and email address; defaults to username>
Pre-Depends: <packages>
Depends: <packages>
Recommends: <packages>
Suggests: <package>
Provides: <(virtual)package>
Architecture: all
Copyright: <copyright file; defaults to GPL2>
Changelog: <changelog file; defaults to a generic changelog>
Readme: <README.Debian file; defaults to a generic one>
Extra-Files: <additional files for the doc directory, commaseperated>
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph
</example>
<p>
.
,
, :
<p>
<example>
Section: misc
Priority: optional
Standards-Version: 3.0.1
Package: mta-local
Provides: mail-transport-agent
</example>
<p>
, . <package>mutt</package>
<package>mail-transport-agent</package>,
MTA,
<package>mail-transport-agent</package>,
, Provides.
<p>
:
<p>
<example>
# equivs-build <var>name</var>
dh_testdir
touch build-stamp
dh_testdir
dh_testroot
dh_clean -k
# Add here commands to install the package into debian/tmp.
touch install-stamp
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `<var>name</var>' in `../<var>name</var>_1.0_all.deb'.
The package has been created.
Attention, the package has been created in the current directory,
</example>
<p>
<tt>.deb</tt> .
<p>
, <prgn>equivs</prgn>.
<tt>my-favorites</tt>,
, .
, .
<p>
<file>/usr/share/doc/equivs/examples</file>. .
</sect>
<sect id="localepurge"> : localepurge
<p>
Debian .
, Debian ,
<tt>pt_BR</tt> <tt>es</tt>.
<p>
<package>localepurge</package>
.
.
<tt>apt-get install localepurge</tt>.
<p>
, debconf - .
,
,
.
.
</sect>
<sect id="helper-show-versions">
<p>
<prgn>apt-show-versions</prgn>
.
<tt>-u</tt> :
<p>
<example>
$ apt-show-versions -u
libeel0/unstable upgradeable from 1.0.2-5 to 1.0.2-7
libeel-data/unstable upgradeable from 1.0.2-5 to 1.0.2-7
</example>
</sect>
</chapt>
<chapt id="search"> .
<p>
APT
,
, , , .
<p>
... APT.
;
<p>
.
<tt>apt-cache</tt>. APT
.
.
<sect id="cache">
<p>
,
Atari 2600. APT
Atari, . :
<p>
<example>
# apt-cache search atari
atari-fdisk-cross - Partition editor for Atari (running on non-Atari)
circuslinux - The clowns are trying to pop balloons to score points!
madbomber - A Kaboom! clone
tcs - Character set translator.
atari800 - Atari emulator for svgalib/X/curses
stella - Atari 2600 Emulator for X windows
xmess-x - X binaries for Multi-Emulator Super System
</example>
<p>
,
.
, :
<p>
<example>
# apt-cache show stella
Package: stella
Priority: extra
Section: non-free/otherosfs
Installed-Size: 830
Maintainer: Tom Lear <tom@trap.mtview.ca.us>
Architecture: i386
Version: 1.1-2
Depends: libc6 (>= 2.1), libstdc++2.10, xlib6g (>= 3.3.5-1)
Filename: dists/potato/non-free/binary-i386/otherosfs/stella_1.1-2.deb
Size: 483430
MD5sum: 11b3e86a41a60fa1c4b334dd96c1d4b5
Description: Atari 2600 Emulator for X windows
Stella is a portable emulator of the old Atari 2600 video-game console
written in C++. You can play most Atari 2600 games with it. The latest
news, code and binaries for Stella can be found at:
http://www4.ncsu.edu/~bwmott/2600
</example>
<p>
( )
, .
, . :
<p>
<example>
# apt-cache show lilo
Package: lilo
Priority: important
Section: base
Installed-Size: 271
Maintainer: Russell Coker <russell@coker.com.au>
Architecture: i386
Version: 1:21.7-3
Depends: libc6 (>= 2.2.1-2), debconf (>=0.2.26), logrotate
Suggests: lilo-doc
Conflicts: manpages (<<1.29-3)
Filename: pool/main/l/lilo/lilo_21.7-3_i386.deb
Size: 143052
MD5sum: 63fe29b5317fe34ed8ec3ae955f8270e
Description: LInux LOader - The Classic OS loader can load Linux and others
This Package contains lilo (the installer) and boot-record-images to
install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
.
You can use Lilo to manage your Master Boot Record (with a simple text screen)
or call Lilo from other Boot-Loaders to jump-start the Linux kernel.
Package: lilo
Status: install ok installed
Priority: important
Section: base
Installed-Size: 190
Maintainer: Vincent Renardias <vincent@debian.org>
Version: 1:21.4.3-2
Depends: libc6 (>= 2.1.2)
Recommends: mbr
Suggests: lilo-doc
Description: LInux LOader - The Classic OS loader can load Linux and others
This Package contains lilo (the installer) and boot-record-images to
install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
.
You can use Lilo to manage your Master Boot Record (with a simple text screen)
or call Lilo from other Boot-Loaders to jump-start the Linux kernel.
</example>
<p>
.
, :
<p>
<example>
# apt-cache showpkg penguin-command
Package: penguin-command
Versions:
1.4.5-1(/var/lib/apt/lists/download.sourceforge.net_debian_dists_unstable_main_binary-i386_Packages)(/var/lib/dpkg/status)
Reverse Depends:
Dependencies:
1.4.5-1 - libc6 (2 2.2.1-2) libpng2 (0 (null)) libsdl-mixer1.1 (2 1.1.0) libsdl1.1 (0 (null)) zlib1g (2 1:1.1.3)
Provides:
1.4.5-1 -
Reverse Provides:
</example>
<p>
:
<p>
<example>
# apt-cache depends penguin-command
penguin-command
Depends: libc6
Depends: libpng2
Depends: libsdl-mixer1.1
Depends: libsdl1.1
Depends: zlib1g
</example>
<p>
,
.
</sect>
<sect id="dpkg-search"> dpkg
<p>
.
,
<tt>".h"</tt> :
<p>
<example>
# dpkg -S stdio.h
libc6-dev: /usr/include/stdio.h
libc6-dev: /usr/include/bits/stdio.h
perl: /usr/lib/perl/5.6.0/CORE/nostdio.h
</example>
<p>
:
<p>
<example>
# dpkg -S /usr/include/stdio.h
libc6-dev: /usr/include/stdio.h
</example>
<p>
,
, ,
:
<p>
<example>
# dpkg -l | grep mozilla
ii mozilla-browse 0.9.6-7 Mozilla Web Browser
</example>
<p>
. ,
<tt>mozilla-browser</tt>. ,
<tt>COLUMNS</tt>
:
<p>
<example>
[kov]@[couve] $ COLUMNS=132 dpkg -l | grep mozilla
ii mozilla-browser 0.9.6-7 Mozilla Web Browser - core and browser
</example>
<p>
:
<p>
<example>
# apt-cache search "Mozilla Web Browser"
mozilla-browser - Mozilla Web Browser
</example>
</sect>
<sect id="auto-apt">
<p>
, , !
<tt>.h</tt> .
<prgn>auto-apt</prgn> .
,
.
<p>
, , :
<p>
<example>
# auto-apt run command
</example>
<p>
`command'
. :
<p>
<example>
# auto-apt run ./configure
</example>
<p>
apt-get . X,
.
<p>
auto-apt
.
<tt>auto-apt update</tt>, <tt>auto-apt updatedb</tt>
<tt>auto-apt update-local</tt>.
</sect>
<sect id="apt-file">
<p>
,
<prgn>apt-cache</prgn>,
, ,
<prgn>apt-file</prgn>
. :
<p>
<example>
$ apt-file search <var>filename</var>
</example>
<p>
<tt>dpkg -S</tt>,
.
,
<prgn>auto-apt</prgn>
, <ref id="auto-apt">.
<p>
, :
<p>
<example>
$ apt-file list <var>packagename</var>
</example>
<p>
<prgn>apt-file</prgn>
, auto-apt
. :
<p>
<example>
# apt-file update
</example>
<p>
, <prgn>apt-file</prgn>
auto-apt, <ref id="auto-apt">.
</sect>
<sect id="apt-listchanges"> .
<p>
(<tt>/usr/share/doc/packagename</tt>)
<tt>changelog.Debian.gz</tt>
.
<tt>zless</tt>,
, ,
.
<p>
<prgn>apt-listchanges</prgn>.
<package>apt-listchanges</package>.
, Debconf .
.
<p>
"Should apt-listchanges be automatically run by apt?"
apt
. "Should apt-listchanges prompt
for confirmation after displaying changes?"
.
apt-listchanges
apt .
<p>
apt-listchanges , ""
( CD mounted ) apt
.
</sect>
</chapt>
<chapt id="sourcehandling">
<sect id="source">
<p>
. ,
. APT
,
.deb .
<p>
Debian
, ,
, .
.deb
.
<p>
, <tt>deb-src</tt>
<tt>/etc/apt/sources.list</tt> ,
( ).
<ref id="sources.list">.
<p>
, :
<p>
<example>
$ apt-get source packagename
</example>
<p>
: <tt>.orig.tar.gz</tt>, <tt>.dsc</tt>
<tt>.diff.gz</tt>.
Debian,
<tt>"orig"</tt> .
<p>
<tt>.dsc</tt> dpkg-source
<var>packagename-version</var>.
<tt>debian/</tt>
.deb.
<p>
,
<tt>-b</tt> , :
<p>
<example>
# apt-get -b source packagename
</example>
<p>
.deb ,
:
<p>
<example>
# dpkg-buildpackage -rfakeroot -uc -b
</example>
<p>
.
, :
<p>
<example>
# dpkg -i <var>file.deb</var>
</example>
<p>
<tt>source</tt> <prgn>apt-get</prgn>
. <tt>source</tt>
, .
<tt>apt-get source package</tt>.
</sect>
<sect id="build-dep">
<p>
,
.
'Build-Depends:'
.
<p>
APT .
<tt>apt-get build-dep package</tt>, `package'
. :
<p>
<example>
# apt-get build-dep gmc
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
comerr-dev e2fslibs-dev gdk-imlib-dev imlib-progs libgnome-dev libgnorba-dev
libgpmg1-dev
0 packages upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
Need to get 1069kB of archives. After unpacking 3514kB will be used.
Do you want to continue? [Y/n]
</example>
<p>
<package>gmc</package> .
.
<tt>apt-get source</tt> .
<p>
,
<tt>apt-cache show</tt> ( <ref id="search">),
, , <tt>Build-Depends</tt>
.
<p>
<example>
# apt-cache showsrc <var>package</var>
</example>
</sect>
</chapt>
<chapt id="erros">
<sect id="erros-comuns">
<p>
,
.
.
<p>
<tt>apt-get install package</tt>...
<p>
<example>
Reading Package Lists... Done
Building Dependency Tree... Done
W: Couldn't stat source package list 'http://people.debian.org unstable/ Packages' (/var/state/apt/lists/people.debian.org_%7ekov_debian_unstable_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these missing files
E: Couldn't find package penguineyes
</example>
<p>
<tt>apt-get update</tt>
<tt>/etc/apt/sources.list</tt>.
<p>
:
<p>
<example>
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
</example>
<p>
<prgn>apt-get</prgn>
<tt>source</tt>, ,
.
<p>
<prgn>apt-get</prgn> ,
<prgn>apt-get</prgn>
<prgn>dpkg</prgn> .
<tt>source</tt>.
<p>
,
:
<p>
<example>
# apt-get -f install
# dpkg --configure -a
</example>
<p>
.
.
.
<p>
"E: Dynamic MMap ran out of room"
<tt>apt-get update</tt>,
<file>/etc/apt/apt.conf</file>:
<example>
APT::Cache-Limit 10000000;
</example>
</sect>
<sect id="help"> ;
<p>
,
Debian.
<tt>--help</tt> manpages
,
<tt>/usr/share/doc</tt> <tt>/usr/share/doc/apt</tt>.
<p>
,
Debian.
Debian:
<url id="http://www.debian.org" name="http://www.debian.org">.
<p>
Debian
.
</sect>
</chapt>
<chapt id="distros"> APT;
<p>
APT:
<p>
Debian GNU/Linux (<url id="http://www.debian.org" name="http://www.debian.org">)
- APT
<p>
Conectiva (<url id="http://www.conectiva.com.br" name="http://www.conectiva.com.br">)
- port APT rpm
<p>
Libranet (<url id="http://www.libranet.com" name="http://www.libranet.com">)
<p>
Mandrake (<url id="http://www.mandrake.com" name="http://www.mandrake.com">)
<p>
PLD (<url id="http://www.pld.org.pl" name="http://www.pld.org.pl">)
<p>
Vine (<url id="http://www.vinelinux.org" name="http://www.vinelinux.org">)
<p>
APT4RPM (<url id="http://apt4rpm.sf.net" name="http://apt4rpm.sf.net">)
<p>
Alt Linux (<url id="http://www.altlinux.ru/" name="http://www.altlinux.ru/">)
<p>
Red Hat (<url id="http://www.redhat.com/" name="http://www.redhat.com/">)
<p>
Sun Solaris (<url id="http://www.sun.com/" name="http://www.sun.com/">)
<p>
SuSE (<url id="http://www.suse.de/" name="http://www.suse.de/">)
<p>
Yellow Dog Linux (<url id="http://www.yellowdoglinux.com/"
name="http://www.yellowdoglinux.com/">)
</chapt>
<chapt id="agradecimentos">
<p>
Debian-BR,
Debian,
. :)
<p>
CIPSGA
.
<p>
:
<p>
Yooseong Yang <yooseong@debian.org>
<p>
Michael Bramer <grisu@debian.org>
<p>
Bryan Stillwell <bryan@bokeoa.com>
<p>
Pawel Tecza <pawel.tecza@poczta.fm>
<p>
Hugo Mora <h.mora@melix.com.mx>
<p>
Luca Monducci <luca.mo@tiscali.it>
<p>
Tomohiro KUBOTA <kubota@debian.org>
<p>
Pablo Lorenzzoni <spectra@debian.org>
<p>
Steve Langasek <vorlon@netexpress.net>
<p>
Arnaldo Carvalho de Melo <acme@conectiva.com.br>
<p>
Erik Rossen <rossen@freesurf.ch>
<p>
Ross Boylan <RossBoylan@stanfordalumni.org>
<p>
Matt Kraai <kraai@debian.org>
<p>
Aaron M. Ucko <ucko@debian.org>
<p>
Jon slund <d98-jas@nada.kth.se>
</chapt>
<chapt id="novas">
<p>
<url id="http://www.debian-br.org"
name="Debian-BR"> Debian.
<p>
Debian
Documentation Project,
<url id="http://www.debian.org/doc/ddp"
name="http://www.debian.org/doc/ddp">.
<p>
email
<email>kov@debian.org</email>.
</chapt>
</book>
</debiandoc>
|