Solved [Solved] FreeBSD 10x64 upgraded,but PKG problems,etc

I successfully did a FreeBSD upgrade last night by following ch. 23 from the handbook.

However,there are a few problems:

After just trying to install Perl:

Code:
root@freebsd:/usr/home/richard # pkg install perl
Updating repository catalogue
digests.txz                         100% 1073KB 536.7KB/s 553.4KB/s   00:02    
packagesite.txz                     100% 4971KB 552.4KB/s 751.2KB/s   00:09    
pkg: package accessibility/accerciser is built for freebsd:9:x86:64 arch, and local arch is freebsd:10:x86:64
Incremental update completed, 0 packages processed:
0 packages updated, 0 removed and 22947 added.
pkg: No digest falling back on legacy catalog format
pkg: http://pkg.FreeBSD.org/freebsd:9:x86:64/latest/repo.txz: Not Found

What does all that mean?

I ran pkg2ng(to convert pkg to ng?)just before that and it appeared to work.

Anyway,I was intending to install webmin.

I only have a few extras installed at this time,namely: sshd,samba,xfce and that's pretty much it.I understand that before doing an upgrade you should remove all extras and the ports tree,or you can just upgrade them after?Since they're still working fine,do I need to?
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

If you've upgraded from the 9 branch, everything on the system is compiled for that branch. You'll have some difficulty trying to mix and match ABI. Safest bet if you aren't using a lot of port options would be to just run pkg upgrade -f to reinstall every package on the system with ones compiled for 10. Be sure to check /usr/ports/UPDATING beforehand for any package specific issues. Once you have all the packages built for 10, you can always go back from that point and re-compile locally any specific packages you used special options with.
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

Thanks.

That just gave the same error as above.
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

After changing to a new major version, all installed packages must be rebuilt or upgraded. How to do that depends on whether you are using ports or packages.
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

What is the output of file /bin/sh?

I had a similar issue when I upgraded a 8.x to 9.x and I kept getting the same error messages. Turns out I forgot the second run of freebsd-update install so it had only installed the new kernel, not the rest of the world.
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

Last night I tried running the command recommended above ( pkg upgrade -f),but,got the same error message.

After checking /usr/ports/UPDATING,as suggested above,I noted that the first item needing updating was/security/libtasn1 ,so after running the first recommended command portmaster -r,I rebooted,but,could not boot into xfce,because .xauthority was missing.

Then,I tried to run desktop-installer to installkde4(I don't like xfce and it won't allow me to login(occasionally it does!),so I have to exit to the command line,login,then use startx,but,it complained that hald was missing;this mess is going from bad to worse!

You are right,Sir Dice.I was reading up on it all this morning and I believe I neglected to run freebsd-update install the 2nd time,after rebooting.

Current error:
$ startx
xauth: file /home/richard/.serverauth.4097 does not exist

Shared object "libhal.so.1" not found, required by "X"

^Cxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2


I did press cntrl-c,so maybe that accounts for the last line.

Is there any way to recover from all this? Or,is it....?


It seems my best option is to download the FreeBSD 10x64 dvd and start over!?

I'm dowloading the dvd iso,anyway.
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

It will not work to rebuild a single port or reinstall a single package. They all have to be done, or some will depend on missing things and fail to run.

I don't use binary packages, but I would expect the command to be pkg upgrade -af. Maybe that will work, but it will not give you KMS video drivers, which must be built from ports currently. The man page for ports-mgmt/portmaster had an upgrade procedure for rebuilding all ports in the fastest way. Here's my updated version of that:
Code:
1. portmaster --list-origins > ~/installed-port-list
2. Update the ports tree
3. portmaster -ty --clean-distfiles
4. portmaster -Faf
5. pkg delete -afy
6. rm -rf /usr/local/lib/compat/pkg
7. Back up any files in /usr/local you wish to save,
   such as configuration files in /usr/local/etc
8. Manually check /usr/local and /var/db/pkg
   to make sure that they are really empty
9. Install ports-mgmt/pkg and then ports-mgmt/portmaster
   Remove both from ~/installed-port-list
10. portmaster --no-confirm `cat ~/installed-port-list`
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

I started over;did a fresh 10.0 install this morning.This time,I'll just add Samba,and maybe FAMP (I have to install Perl first,right?) and stay with a basic text-based system until I get to know FreeBSD really, then think about adding KDE later on.

I have used the ports tree occasionally, but stuck to binary packages, especially for big stuff like xorg, gnome, etc.

How can I avoid the above problem when the next upgrade comes along?

BTW: I saw your interview on BSDNow. Interesting -especially the graphics!
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

A reinstall is really not needed. Deleting all the installed leaves just the base operating system.

KDE is really the worst-case desktop environment to install. It's huge, with lots of dependencies. Gnome is smaller, xfce smaller yet, and there are lightweight window managers that are almost trivial, like x11-wm/fluxbox.

Avoid problems by sticking with either binary packages or ports. Mixing the two is possible, but to do it without problems might require deeper knowledge of both.

The interview went better than expected, and the response has been good. Thanks!
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

I had similar problems as well in my upgrades from 8.4 to 9.2 and 9.2 to 10.0 in virtual machines using pkg. My goal was to learn how to do major upgrades using packages. I followed the guide at this link, http://blog.etoilebsd.net/post/Full_binary_upgrade. No matter what I did I could not get pkg to work before removing the old libraries. So I removed the old libraries at the last step of the upgrade and then used:

Code:
$ pkg-static update
$ pkg-static upgrade -fy

As a side note pkg was working prior to upgrading in each case.

YMMV
 
Re: FreeBSD 10x64 upgraded,but PKG problems,etc

I checked my notes and this is exactly what I did to upgrade 9.2 -> 10.0 back in January. Only major difference is I rebuilt all my packages myself with Poudriere rather than using the public repos.

Backup Old /etc
cp -Rp /etc /root/etc.old
Run freebsd-update to get the latest release
freebsd-update upgrade -r 10.0-RELEASE
First `freebsd-update install` and reboot for new kernel
freebsd-update install
shutdown -r now
Second `freebsd-update install` for new userland
freebsd-update install
shutdown -r now
Poudriere start - Fetch new Poudriere build jail for new release
poudriere jails -c -j 10_0amd64 -v 10.0-RELEASE -a amd64
copy current make.conf only, rebuild and reinstall all packages
cp /usr/local/etc/poudriere.d/92amd64-make.conf /usr/local/etc/poudriere.d/10_0amd64-make.conf
poudriere bulk -f /zfs/poudriere/pkg_list -j 10_0amd64
Update local repository files to point to the new release
find / -name myrepo.conf -exec sed -i '' -e 's/92amd64/10_0amd64/' {} \;
Delete old build jail
poudriere jail -d -j 92amd64
Packages
pkg-static upgrade -fy
pkg autoremove
Third `freebsd-update install` to cleanup old libs (major version upgrades only)
freebsd-update install
shutdown -r now

I also re-installed all my jails and migrated only needed config files to the new ones as I had issues upgrading them. I've excluded that portion of my notes.
 
Back
Top