添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
In all the documentation and posts I've read for the RasPi the recommended way to upgrade a distribution and its packages is to use sudo apt-get update followed by sudo apt-get upgrade. But elsewhere it's recommended that you use sudo apt-get dist-upgrade rather than sudo apt-get upgrade. See, for example, http://askubuntu.com/questions/194651/w ... st-upgrade :-
"The upgrade option only installs new version of the packages that are already installed on the system (and yes, kernel updates belong to them).
However, sometimes the updates change dependencies: for example, a new version of a package will no longer depend on a library that you have installed, or will require installation of additional libraries. The upgrade option will never remove installed packages that you no longer actually need.
However, the dist-upgrade option can "intelligently" handle changes in the dependencies system. This includes removing packages that are no longer necessary or resolve conflicts between packages that arose because of changes in the dependencies."

Because of this I've started to use apt-get update && apt-get dist-upgrade with my Pi (running Raspbian) rather than apt-get update && apt-get upgrade . I gather from other Google searches that the only disadvantage of doing this is that by using apt-get upgrade "you keep the old kernel versions around so that in case there is a problem with booting the new kernel, you can choose the old one from the boot menu and recover."
Has anyone any comments/advice regarding this?
The main difference between upgrade and dist-upgrade is that dist-upgrade will add or remove packages to update others while upgrade won't. Dist-upgrade can be a useful tool but you MUST check what it is planning to do before saying yes because sometimes it's idea of what should be removed to make way for upgrades will disagree with yours ;) .
Just adding a single data point here:
I've been using Ubuntu since '05 and just starting with Rasbian.
I've always used dist-upgrade and don't recall a single issue with it.
mmcmonster wrote: Just adding a single data point here:
I've been using Ubuntu since '05 and just starting with Rasbian.
I've always used dist-upgrade and don't recall a single issue with it.
Same here, I've adminned dozens of Ubuntu/Debian boxes over the last 10 years and always use dist-upgrade and haven't ever had a problem :)
What is the current recommendation for getting everything to the latest level?
I've just seen this posted on another thread

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
reboot
sudo rpi-update
reboot
but where does apt-get upgrade and apt-get rpi-update fit into the grand scheme of things?
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org
Cancelor wrote: What is the current recommendation for getting everything to the latest level?
I've just seen this posted on another thread

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
reboot
sudo rpi-update
reboot
but where does apt-get upgrade and apt-get rpi-update fit into the grand scheme of things?
rpi-update is the firmware / kernel updates
apt-get see the MAN http://linux.die.net/man/8/apt-get
Take what I advise as advice not the utopian holy grail, and it is gratis !!
In RaspBian you can set that at the end of the boot, before starting the graphical screen may be asked the following:
"Do you want to start the update (S / N)?"
where S is start typing the commands:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
and typing instead N to start the graphical screen.
This is to remember to do the update in a while.
You're responding to topic that's about 6 months old.
More importantly: generally I would advise against using rpi-update, unless there is a good reason.
In the last couple of weeks several users got a bit of a surprise when kernel 3.18 was installed when they used rpi-update, and all kinds of peripherals stopped working... ( http://www.raspberrypi.org/forums/viewt ... 28&t=97314 )
I joined recently and in my research came out this thread.
Putting aside about sudo rpi-update, you can do as requested?
Thank You
luipez wrote: I joined recently and in my research came out this thread.
Putting aside about sudo rpi-update, you can do as requested?
Thank You
enter in commanline (terminal). Linux base knowledge.
enter in commanline (terminal). Linux base knowledge. I would like to make a script that does this:
at the end of the boot, before starting the graphical screen may be asked the following:
"Do you want to start the update (S / N)?"
where S is start typing the commands:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
and typing instead N to start the graphical screen.