# version number mismatch - no X server



## Deleted member 9563 (Jan 2, 2017)

I did an upgrade from 10.1 to 10.3 to 11.0-RELEASE. This included the appropriate updates and reboots. It seemed to work fine but I noticed that Virtualbox would start but not run any of my operating systems. I am using the pkg system and tried to update/upgrade again, but it just says all is fine.

Upon rebooting later, I have no DE which would normally be KDE. networking and non GUI programs are working fine so I do have access to the machine with a terminal and SSH.

Before rebooting and while KDE was running, I got several error messages in the konsole when trying to run portmaster. Sorry, I can't put my finger on them now, but here is what I see in a terminal when running make, and that is the same as one of them:


```
make: "usr/ports/Mk/bsd.port.mk" line 1148: UNAME_r (11.0-RELEASE-p2) and OSVERSION (1003000)
do not agree on major version number.
```

Here is the message in the terminal when trying to start KDE:

```
% startkde
Unable to load library icui18n 'Cannot load library icui18n: (Shared object 'icui18n' not found,
required by 'kde4-config') "$DISPLAY is not set or cannot connect to X server.
```

Any and all suggestions welcome.


----------



## SirDice (Jan 2, 2017)

Looks like you ran `freebsd-update install` only once. It needs to be run multiple times.


----------



## Deleted member 9563 (Jan 2, 2017)

Yes, it does look like that. However, I've run it a dozen times, it seems like - and rebooted in between. 

These are the commands which I ran:

```
# portsnap fetch update
# freebsd-update fetch
# pkg update
# pkg upgrade
```

I did this for each of 10.1, 10,3, and 11.0. With, of course the first 11.0 one being with the `-r` directive. 

Since it didn't work as expected, I did the following as well.

```
# portsnap fetch extract
```
Which, after the X environment was gone, actually appeared to download. It didn't make any difference though. However, I think it is this command which is the one which broke the ability to run X:


```
# pkg autoremove
```

I only ran that once, and from my past experience I've noticed that it removes the compiler. If that is the problem, then it always fixed itself in the past, but I didn't get any relevant prompts this time and don't know how best to fix that.

This system, by the way, has been stable since 10.0-RELEASE first came out and has been updated regularly. This is the first serious problem I've encountered. Also, should add that I haven't seen anything relevant in /usr/ports/UPDATING.


----------



## Deleted member 9563 (Jan 2, 2017)

I just found what I think is the relevant error message. It is the result of any portmaster command.

```
===>>> The value of DISTDIR cannot be empty
===>>> Aborting update
```

That message came up every time I tried to run portmaster even before the DE stopped working. (It's the message I couldn't remember when I first posted.) I've spent some hours doing a net search on that message and it seems like many people encounter it, but no one has posted a solution. I'm assuming they just reinstalled in the end.


----------



## chrbr (Jan 2, 2017)

OJ said:


> These are the commands which I ran:
> 
> ```
> # portsnap fetch update
> ...


I think you need to worry about `freebsd-update` until `freebsd-version` and `uname -a` show that you are one the version you want to go to. SirDice mentioned `freebsd-update install` instead of `freebsd-update fetch`. When kernel and world are on FreeBSD11 it should be time to think about ports or packages.


----------



## Deleted member 9563 (Jan 2, 2017)

Thanks chrbr, but I don't understand what you are suggesting.  I have followed the handbook instructions and done it a dozen time in this case. I don't think there is any point in doing what you suggest any more times. Like I say,  a dozen should be enough. I am already running 11.0-RELEASE according to everything that I can see.  There is no indication that the update did not work other than the version mismatch.  What I want is to be able to install programs and run KDE again. That is what was happening when I first updated. Here is the uname output.


```
#  uname -a
FreeBSD SCO.cgs 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

It appears there is some problem with make which has caused this situation.

PS: I'm on another computer and don't have access to the specialized FreeBSD forum commands. My apologies.


----------



## chrbr (Jan 2, 2017)

Dear OJ, I did not meant to be offensive. Please excuse me. If `freebsd-version` or `freebsd-version -k` or `freebsd-version -u` also report that you are on FreeBSD11 it should be time to worry about the ports. `freebsd-update` is required to run multiple times to update in more than one steps. And in the post I have quoted you just mentioned `frebsd-update fetch` instead of `freebsd-update install`. Please excuse my misunderstanding. BTW: The post above looks perfect.


----------



## ASX (Jan 2, 2017)

I have read several times that after a major version upgrade there is the need to reinstall all ports/packages:
Problem after updating to FreeBSD 11.0

not something I have tried myself ... just reporting what I read.


----------



## Deleted member 9563 (Jan 2, 2017)

chrbr said:


> Dear OJ, I did not meant to be offensive. Please excuse me.



I'm the one that owes you an apology.  I'm feeling a little thin skinned about this at the moment. I'll get over it.


----------



## Deleted member 9563 (Jan 3, 2017)

From the link that ASX gave me, it would appear that I didn't come across this major step in the handbook:

```
# pkg-static upgrade -f
```

That just finished, and appeared to work. However, here is what I did after that. (I truncated the duplicate messages for brevity.)

```
# shutdown -r now
# freebsd-update install

ln: ///usr/share/openssl/man/man3/EVP_DigestFinal.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/EVP_DigestFinal.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/ASN1_add_oid_module.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/EVP_cleanup.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/EVP_cleanup.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/EVP_cleanup.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/PKCS7_get0_signers.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/DTLS_client_method.3.gz: No such file or directory
ln: ///usr/share/openssl/man/man3/DTLS_client_method.3.gz: No such file or directory

# shutdown -r now
#startkde
$DISPLAY is not set cannot connect to the X server.
# ifconfig
Shared object "lib80211.so.1" not found. required by "ifconfig"
# pkg update -f
Shared object "libcrypto.so.8" not found. required by "libarchive.so.6"
```

As can be seen from that, there is now also no network.

I am completely stuck.

Edit: error corrected, should have said libcrypto.so.8


----------



## Phishfry (Jan 3, 2017)

Sound like my post here. Try these:
https://forums.freebsd.org/threads/57200/#post-326139
`pkg-static install -f pkg`
`pkg upgrade -f`


----------



## Deleted member 9563 (Jan 3, 2017)

Yes Phishfry that looks like about it. But that ship sailed. I've done that and the requisite reboots, but am still stuck.

That said, I have now regained the ability to run those commands by copying libcrypto.so.8 from a live disk. I also added lib80211.so.1 while I was at it, so now networking is happening again. Phew!

My understanding of the present problem is that there may still be a version mismatch. I say that because running sockstat produces the following:

```
sockstat: struct xtcpcb size mismatch
```
 Redoing the proper upgrade sequence does not fix this now. I will ignore that for now, and concentrate on getting the DE working. It seems there is no video driver or connection to the X server.


----------



## chrbr (Jan 3, 2017)

OJ said:


> 'm the one that owes you an apology.  I'm feeling a little thin skinned about this at the moment. I'll get over it.


Thank you, I thought it was me who made you angry. One thing I can suggest to see the report of pkg_libchk(1) which is a part of sysutils/bsdadminscripts.


----------



## SirDice (Jan 3, 2017)

OJ said:


> ```
> # ifconfig Shared object "lib80211.so.1" not found. required by "ifconfig"
> ```


This shows me you're probably still running a FreeBSD 10 userland on a 11 kernel. 

Forget about ports/packages, you'll need to fix this first.

The correct upgrade path is:
`freebsd-update -r 11.0-RELEASE upgrade`
`freebsd-update install`
Reboot the machine.
`freebsd-update install`
`pkg-static install -f pkg`
`pkg upgrade -f`
`freebsd-update install`
Reboot.

As you can see `freebsd-update install` needs to be run a total of three times.


----------



## Deleted member 9563 (Jan 4, 2017)

SirDice said:


> This shows me you're probably still running a FreeBSD 10 userland on a 11 kernel.



That is indeed what it looks like. The steps you outline is what I've been doing. 




> Forget about ports/packages, you'll need to fix this first.
> 
> The correct upgrade path is:
> `freebsd-update -r 11.0-RELEASE upgrade`




```
Cannot upgrade from 11.0-RELEASE to itself.
```



> `freebsd-update install`




```
no updates are available to install
```



> Reboot the machine.


ok, just in case 


> `freebsd-update install`


same as before, nothing


> `pkg-static install -f pkg`


this resulted in one downgrade

```
pkg: 1.9.4.1 -> 1.8.8
```



> `pkg upgrade -f`


This was more successful. It always does this, but the files could be slightly different from before.

```
All repositories are up-to-date.
Number of packages to be installed: 20
Number of packages to be reinstalled: 891
Number of packages to be downgrded: 106
```
I answered yes, and it proceeded, leaving me with these messages:

```
You may need to manually rename /compat/linux/etc/krb5.conf
if it is no longer needed.
You may need to manually rename /compat/linux/etc/nsswitch.conf
if it is no longer needed.
pkg: Fail to rename /compat/linux/dev/.shm.DpoyiVrdyXg ->
/comat/linux/dev/ssm: Is a directory
```



> `freebsd-update install`




```
No updates available to install
Run 'usr/sbin/freebsd-update fetch' first.
```
which I did . . . and got the same old,

```
Looking up update.FreeBSD.org.mirrors... 4 mirrors found.
Fetching metadata signature for 11.0-Release from updates4.freebsd.org... invalid signature.
Fetching metadata signature for 11.0-Release from updates5.freebsd.org... invalid signature.
Fetching metadata signature for 11.0-Release from updates6.freebsd.org... invalid signature.
Fetching metadata signature for 11.0-Release from updates3.freebsd.org... invalid signature.
No mirrors remaining, giving up.
```



> Reboot.


done


> As you can see `freebsd-update install` needs to be run a total of three times.



Nothing happened. This does not work for me in this case.

From my net searching, it appears that this happens to many people and there does not seem to be a fix.
I did find some hope from a post on this forum by kpa here: https://forums.freebsd.org/threads/52013/ where he suggests that downloading an older library and installing that so the system may be able to right itself with updates. I did that, and tried the above again. No difference. 

Thanks all for the suggestions. I am grateful for the help.  In the end though it seems like the version number mismatch, and/or the signature is what needs to be fixed. So far no one has addressed that issue in any post on the net which I've been able to locate.


----------



## ASX (Jan 4, 2017)

OJ said:


> this resulted in one downgrade
> 
> ```
> pkg: 1.9.4.1 -> 1.8.8
> ```



This downgrade let me think at switching repository from "latest" to "quarterly", probably not the main issue in your case.

`pkg -vv` will show your pkg settings.

However, as you noted yourself, the main problem seems to be the "invalid signature", which once was solved here:
https://forums.freebsd.org/threads/54234/#post-305500


----------



## SirDice (Jan 4, 2017)

You may want to try to `freebsd-update rollback` to get it back to a working state. Apparently something went wrong during  the upgrade and things are now pretty messed up.


----------



## Deleted member 9563 (Jan 5, 2017)

thanks for replying ASX and SirDice. I'll post details tomorrow when, hopefully, the freebsd.org servers are working again. It's looking hopeful otherwise.


----------



## Deleted member 9563 (Jan 7, 2017)

ASX said: "This downgrade let me think at switching repository from "latest" to "quarterly", probably not the main issue in your case.
pkg -vv will show your pkg settings."

Thanks, that does show that the packages are still on 10-RELEASE. Also, regarding the "invalid signature" that link suggests an additional line added at the top of openssl.cnf, but that did not happen here. Interesting that there is no posts or information around on that topic.

SirDice said: "You may want to try to freebsd-update rollback to get it back to a working state. Apparently something went wrong during the upgrade and things are now pretty messed up."

Good idea. I did that and indeed got some movement and a lot of packages downloaded. In fact it took 6 hours with all the retries needed. However, the end result is that the pkg system balked at installing them.

I'm going to leave this effort for now. I've learnt some things, so I thank everybody for their helpful comments. 

PS: Sorry, I can't seem to get the quoting system to work.


----------

