Jinsi ya kusasisha kifurushi kimoja ukitumia apt-kupata?


Nenda kwa jibu lililokubaliwa


Je! Ninasasishaje kifurushi kimoja? Kwa kadiri man apt-get inavyosema apt-get upgrade haichukui kifurushi / orodha ya vifurushi kama parameta.

kuboresha

sasisho hutumiwa kusanikisha toleo mpya zaidi la vifurushi vyote vilivyosanikishwa kwenye mfumo kutoka kwa vyanzo vilivyojumuishwa ndani /etc/apt/sources.list . Vifurushi vilivyosanikishwa kwa sasa na toleo mpya zinazopatikana hutolewa na kusasishwa; chini ya hali yoyote sasa vifurushi zilizosanikishwa sasa huondolewa, au vifurushi ambazo hazijasakinishwa tayari na kusakinishwa. Toleo jipya la vifurushi zilizosanikishwa sasa ambazo haziwezi kusasishwa bila kubadilisha hali ya usanidi mwingine zitaachwa kwa toleo lao la sasa. Sasisho lazima lifanyike kwanza ili apt-ajue kuwa toleo mpya za vifurushi zinapatikana.


850





2011-05-20




Idadi ya majibu: 8


Unahitaji tu kufanya apt-get install --only-upgrade <packagename> . Hii itasasisha tu kifurushi hicho moja, na tu ikiwa imewekwa.

Ikiwa unataka kusanikisha kifurushi ikiwa haipo, au uiboresha ikiwa iko, unaweza kuondoka --only-upgrade .


1057


2011-05-20

Ili kusasisha kifurushi kimoja kwa kutumia CLI:

 sudo apt-get install --only-upgrade <packagename>
 

mfano, sudo apt-get install --only-upgrade ack

 Reading package lists... Done
Building dependency tree       
Reading state information... Done
Skipping **ack**, it is not installed and only upgrades are requested.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 

132


2012-10-15

Kuna njia mbili zinazowezekana ambazo ninaweza kufikiria:

  1. sudo apt-get install nameofpackage

    Hii itasasisha kifurushi hata ikiwa tayari imewekwa:

     ~$ sudo apt-get install emesene
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be upgraded:
      emesene
    1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
    Need to get 1,486 kB of archives.
    After this operation, 696 kB disk space will be freed.
    Get:1 http://il.archive.ubuntu.com/ubuntu/ natty-updates/universe emesene all 2.11.4+dfsg-0ubuntu1 [1,486 kB]
     
  2. Kutumia Synaptic Package Manager : Bonyeza kulia → Alama ya kuboresha :


    ingiza maelezo ya picha hapa

    Kumbuka : Wakati mwingine inaweza kuuliza vifurushi au utegemezi wa ziada, ni kawaida.


56


2011-05-20

Katika uzoefu wangu juu ya Ubuntu 12.04 LTS, kutumia amri hapa chini hautaboresha kifurushi ikiwa utatumia PPA tofauti -

 sudo apt-get --only-upgrade install <packagename>
 

Vivyo hivyo, sikutaka kutekeleza amri ya kusasisha, ambayo inaweza kusasisha vifurushi vyote kwenye seva yangu -

 sudo apt-get dist-upgrade
 

Kwa mfano, nimeweka PHP 5.3 na nimeongeza ondrej PPA kwenye vyanzo vyangu vya apt.s kwa kutumia -

 sudo add-apt-repository ppa:ondrej/php5
 

Nikikimbia

 sudo apt-get install php5
 

itaingiza tena PHP 5.3.

Lazima, kwanza, nambari ya nambari ya toleo ili kuboresha, kutumia

 sudo apt-cache policy php5
 

Hii itaorodhesha nambari zote za toleo zinazopatikana. Unapaswa kupata nambari ya toleo unayotaka kusasisha, na kisha unakili kamba nzima ambayo inarejelea. Kwa mfano, kamba ya PHP 5.5 juu ya Ubuntu ni "5.5.16 + dfsg-1 + deb.sury.org ~ sahihi + 2".

Sasa, unaweza kuendesha amri ya kusanidi-kupata na nambari maalum ya toleo, na voila!

 sudo apt-get install php5=5.5.16+dfsg-1+deb.sury.org~precise+2
 

Nimeongeza hii tu kwa sababu sikuweza kupata habari hii mahali pengine popote!


25


2014-09-18

Kwenye Ubuntu 9.04 Jaunty,

 apt-get --only-upgrade install <package>
 

mavuno:

 E: Sense only is not understood, try true or false.
 

Amri

 apt-get --only-upgrade true install <package>
 

alifanya kazi katika kesi yangu.


16


2015-04-13

Kwa suluhisho la safu ya amri ambayo haisakili kifurushi ikiwa haipo tayari:

 dpkg -s <package> 2>/dev/null | grep -q Status.*installed && sudo apt-get install <package>
 

Hii inaweza kufanywa kwa maandishi rahisi, kwa mfano:

sasisha-package.sh:

 #!/bin/bash

[[ -z $1 ]] && { echo "Usage: $(basename $0) package"; exit 1; }

if dpkg -s "$1" 2>/dev/null | grep -q Status.*installed; then
    echo "Attempting to upgrade $1"
    sudo apt-get install "$1"
else
    echo "Package $1 is not installed"
fi
 

10


2012-05-22

Swali la zamani lakini nzuri, nachukua uhuru wa kuongeza jibu lililosasishwa ... Kwa ugawaji wa kisasa zaidi, ambapo kando ya programu ya kujaza imejumuishwa, rahisi kama:

 sudo apt upgrade <package-name>
 

1


2019-11-12

Ili kusasisha kifurushi kimoja kwenye Ubuntu 18.04 LTS:

 sudo apt update && sudo apt install --only-upgrade <packagename>
 

Ili kusasisha vifurushi vingi:

 sudo apt update && sudo apt install --only-upgrade <package1> <package2> <package3>
 

0


2019-11-14