# No startx after upgrade 9.2 to 10.0



## paradise (Apr 29, 2014)

Hello,

I upgraded FreeBSD 9.2 to 10.0 with following https://www.freebsd.org/releases/10.0R/ ... ation.html.
First I did:


```
# freebsd-update fetch
# freebsd-update install
```
And

```
# freebsd-update upgrade -r 10.0-RELEASE
# freebsd-update install
# shutdown -r now
```
Logged in init 3 run-level (did I make a mistake ?), I did twice

```
# freebsd-update install
```
Reboot again, but impossible to boot with `startx`, I get

```
xauth: file /home/jbeziat/.serverauth.1248 does not exist
```
and further:

```
Share object 'libcrypto.so.6" not found, required by "X"
```
So I uninstalled old nVidia driver (with `make deinstall`), installed new one with:

```
# cd /usr/ports/x11/nvidia-driver
# make install clean
```
Still same messages.
I verified etc/rc.conf, I still have 

```
hald_enable="YES"
dbus_enable="YES"
```
In xorg.conf, in driver it is still written nvidia.

Where is the problem ? Thank you.


----------



## trh411 (Apr 29, 2014)

After performing a major upgrade of FreeBSD, you need to rebuild all ports. In this case, particularly all Xorg related ports. The upgrade from FreeBSD-9.2 to FreeBSD-10.0 bumped libcrypto.so.6 to libcrypto.so.7. Since your installation of Xorg was built on FreeBSD-9.2, it is looking for libcrypto.so.6, which no longer exists.

`pkg_libchk -qo` will list the ports that are missing libraries, and thus need to be rebuilt.


----------



## paradise (Apr 29, 2014)

Thank you, I tried to install the package _libchk_, but I cannot use anymore pkg_add, and when I try

```
# cd /usr/ports/sysutils/
# pkg install libchk
```
I get

```
Updating repository catalogue
```
I have followed the Installation Instructions, and nothing is working... 

I guess that the upgrade is not complete ?


----------



## trh411 (Apr 29, 2014)

paradise said:
			
		

> Thank you, I tried to install the package _libchk_, but I cannot use anymore pkg_add, and when I try
> 
> ```
> # cd /usr/ports/sysutils/
> ...


Sorry, I should have mentioned that pkg_libchk is provided by sysutils/bsdadminscripts.


----------



## wblock@ (Apr 29, 2014)

paradise said:
			
		

> Logged in init 3 run-level (did I make a mistake ?)



How did you manage to do that?  FreeBSD does not have run levels.


----------



## paradise (Apr 29, 2014)

Is it patch-pkg_libchk, in /usr/ports/sysutils/bsdadminscripts/files? Anyway I get the same message Updating repository catalogue.


----------



## paradise (Apr 29, 2014)

wblock@ said:
			
		

> paradise said:
> 
> 
> 
> ...


Sorry, I am coming from Linux, I mean when I log myself in tty.

I see you later, I go to sleep, it is four in the morning here !  :e


----------



## trh411 (Apr 29, 2014)

paradise said:
			
		

> Is it patch-pkg_libchk ?, in
> 
> ```
> cd /usr/ports/sysutils/bsdadminscripts/files
> ...


Do:

```
cd /usr/ports/sysutils/bsdadminscripts
make install clean
```
Then:

```
pkg_libchk -qo
```
to list the ports with missing libraries.



			
				paradise said:
			
		

> Is it patch-pkg_libchk ?, in
> Anyway I get the same message _Updating repository catalogue_..


The message is pkg(8) related. Are you installing ports or packages?


----------



## wblock@ (Apr 29, 2014)

The Handbook explains about installing applications: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html.


----------



## paradise (Apr 29, 2014)

Alright, it is done.
.
When I launch 

```
pkg_libchk -qo
```
nothing happens.
Am I to assume that I have to install some ports or packages ?

With 


> by wblock@ » 29 Apr 2014 03:17
> The Handbook explains about installing applications: http://www.freebsd.org/doc/en_US.ISO885 ... ports.html.


I understand that already with my FreeBSD 9.2 when I used `pkg_add -r` I was installing packages, and with `cd /usr/ports/...` I was compiling ports? Is it right?
So now the new command is `pkg install -r [i]package[/i]`?

Thank you for your patience, in fact I know quite good Linux, but it is the first time I really deal with FreeBSD in depth.

So now, what I have to do ? Do I have to install again xorg, KDE4 like at the first installation of FreeBSD 9.2?

What is missing to `startx`?


----------



## SirDice (Apr 29, 2014)

paradise said:
			
		

> I understand that already with my FreeBSD 9.2 when I used `pkg_add -r` I was installing packages, and with `cd /usr/ports/...` I was compiling ports? Is it right?


Yes.


> So now the new command is `pkg install -r package`?


There's no need for the -r switch, install implies a remote install. See pkg-install(8).


----------



## paradise (Apr 29, 2014)

SirDice said:
			
		

> There's no need for the -r switch, install implies a remote install. See pkg-install(8).


Alright, thank you.


----------



## trh411 (Apr 29, 2014)

paradise said:
			
		

> Alright, it is done.
> When I launch
> 
> ```
> ...





			
				paradise said:
			
		

> So now the new command is `pkg install -r [i]package[/i]`?


Have you converted to the new PKGNG? See 4.1. Getting Started with pkgng. Once you convert to PKGNG, try running `pkg_libchk -qo` again. Also, after you've converted to PKGNG, do not use any of the `pkg_*`(e.g., pkg_install) commands. Use the new `pkg` (e.g., `pkg install`) instead. Each pkg(8) command has its own man page, for example `man pkg-install` shows the manpage for the `pkg install` command.


----------



## paradise (Apr 30, 2014)

Thank you all, I am busy these days, I come back tomorrow.


----------



## jbvb (May 6, 2014)

```
xauth: file /home/jbeziat/.serverauth.1248 does not exist
```
 implies your name resolver is not working.  This could be why `pkg` stops at "Updating repository catalogue" and might also be why `pkg_libcheck -qo` stalls.


----------



## paradise (May 6, 2014)

Thank you, I come back soon to see this problem.


----------



## paradise (May 10, 2014)

Hello all !

So, I have converted to PKGNG with 


```
# cd /usr/ports/ports-mgmt/pkg
# make
# make install clean
```
,

and I ran  


```
# pkg_libchk -qo
```

, which made 772 jobs.

I ran too :


```
pkg2ng
```

I added in /etc/make.conf :


```
WITH_PKNG=YES
```

Rebooted, I still get the same message :


```
xauth: file /home/jbeziat/.serverauth.1104 does not exist
```

And several lines with 'Xauthority does not exist', and "libcrypto.so.6" not found, like the first time.

Do I have to upgrade some files again, to get for example libcrypto7 whose you were talkiing about ?

I tried :


```
pkg upgrade
```

but I get


```
Updating repository catalogue
```

Thank you.


----------



## paradise (May 11, 2014)

I think that  the problem is caused by libcrypto, in fact my nVidia driver is not installed cause of it.

In /var/log/Xorg.0.log, I get 
	
	



```
Failed to initialize the NVIDIA kernel module
```
 and ***Aborting***.


----------



## trh411 (May 11, 2014)

libcrypto should have been updated from libcrypto.so.6 to libcrypto.so.7 when you upgraded from FreeBSD-9.2 to FreeBSD-10.0. If you still have libcrypto.so.6, then your upgrade is not complete. Execute `ls /lib` and see which version of libcrypto you have installed.


----------



## trh411 (May 11, 2014)

paradise said:
			
		

> I ran
> 
> ```
> # pkg_libchk -qo
> ```


If it did not report any ports with missing libraries, that's good.


			
				paradise said:
			
		

> I added in /etc/make.conf :
> 
> ```
> WITH_PKNG=YES
> ```


It should be PKGNG, but no matter, PKGNG is the default on FreeBSD-10.0, so you can remove it from /etc/rc.conf.


			
				paradise said:
			
		

> Rebooted, I still get the same message :
> 
> ```
> xauth: file /home/jbeziat/.serverauth.1104 does not exist
> ```


Me too. I just ignore them.


----------



## paradise (May 11, 2014)

It is strange, with `ls /lib` I find libcrypto.so.7.  Maybe I have to install nVidia driver manually? I found a NVIDIA-FreeBSD-x86_64-319.60 folder in my home, but in /var/db/pkg/ there are some nvidia-driver-319.32 files or modules, maybe it is the problem, a conflict?


----------



## trh411 (May 11, 2014)

paradise said:
			
		

> It is strange, with
> 
> ```
> ls /lib
> ...


Okay, that's good.


			
				paradise said:
			
		

> Maybe I have to install nVidia driver manually ?


Yes, I would try rebuilding the nvidia driver.


----------



## paradise (May 11, 2014)

So I did:


```
# cd/usr/ports/x11/nvidia-driver
# make deinstall clean
# make install clean
```

But I get an error:


```
(EE) NVIDIA(0): failed to obtain a shared memory identifier
```

and


```
Installing nvidia-driver-319-32... done
make[1]: "/usr/ports/Mk/bsd.xorg.mk" line 158: warning: Couldn't read shell's output for "/usr/localbin/X -version2>&1
```

I ignored these messages, and made


```
# nvidia-xconfig
```

rebooted, but still same messages as at the beginning, impossible to launch startx.

Why does "X" require libcrypto.so. 6? Is it not updated?

What can I do now?


----------



## trh411 (May 11, 2014)

paradise said:
			
		

> rebooted, but still same messages as at the beginning, impossible to launch _startx_.
> 
> Why does "X" require libcrypto.so. 6 ? Is it not updated ?
> What can I do now ?


x11/xorg needs to be rebuilt to use libcrypto.so.7. The x11/xorg currently installed was built under FreeBSD-9.2, which used libcrypto.so.6. Now that you have upgraded to FreeBSD-10.0, libcrypto.so.6 no longer exists, so x11/xorg fails to start. If you rebuild x11/xorg that should resolve the problem.


----------



## paradise (May 11, 2014)

I have rebuilt x11/xorg, but now I get a new problem:


```
startx not found
```
.  x( 

kdm is missing, but I don't mind.

My /.xinitrc is OK:


```
exec /usr/local/kde4/bin/startkde
```

I tried to reinstall kde4, but if `make clean` works, `make install` does not:


```
Share object "libmd.so.5" not found, required by "cmake"
```

I think it would be more simple to reinstall FreeBSD. Doubtless I made a mistake somewhere, and I think it is too difficult to come back. And I don't want to bother you more. Anyway it was my first FreeBSD upgrade, not a success, but I know how to install a FreeBSD, and I have learned some news things in 10.0 version, I did not waste my time, neither you yours.   

If you have any suggestions to resolve my problem, I am OK, otherwise I shall reinstall in few days the all FreeBSD from the ISO.

Thank you all!


----------



## trh411 (May 11, 2014)

paradise said:
			
		

> I have rebuilt x11/xorg, but now I get a new problem :
> 
> ```
> startx not found
> ...


startx(1) is provided by x11/xinit. Install that port to fix this problem. Also, check to make sure you also have x11/xauth installed. The `which xauth` command should return /usr/local/bin/xauth. If it does not install x11/xauth.


----------



## paradise (May 12, 2014)

Thank you, I have installed xinit, a `which` gives:


```
% /usr/local/bin/xinit
```

I have installed too xauth, a `which` gives:


```
% /usr/local/bin/xauth
```

Now, when I do `startx`, I still get:


```
% xauth: file /home/jbeziat/.serverauth.1135 does not exist
```

And:


```
% Share object"libpixman-1.so.9" not found, required by "X"
```

bsdadminscripts-6.1.1_4 is still installed, but libpixman-1.so.9 does not exist.

The new one is not libpixman-1.so.30? So must I  update "X" again and also x11/pixman?

I wonder if I have correctly updated X :q


----------



## trh411 (May 12, 2014)

paradise said:
			
		

> Now, when I do `startx`, I still get:
> 
> ```
> % xauth: file /home/jbeziat/.serverauth.1135 does not exist
> ...


You can ignore the first message from xauth. The second one we need to deal with.

If you don't have ports-mgmt/portmaster installed, you will need to install it. Do the follwoing:

```
cd /usr/ports/ports-mgmt/portmaster
make install clean
portmaster -r pixman
```
The portmaster(8) command will re-install x11/pixman and everything dependent on it in one fell swoop. This should resolve the pixman-1.so.9 error when starting X. When this is done try `startx` again.

EDIT: Be advised, `portmaster -r pixman` may have to rebuild a couple dozen ports or so. Just let it do its thing.


----------



## kpa (May 12, 2014)

You could have avoided all this trouble if you had recompiled all installed ports after the upgrade from 9.2 to 10.0. The ports-mgmt/portmaster manual page portmaster(8) has instructions for doing just that:


```
Using portmaster to do a complete reinstallation of all your ports:
           1. portmaster --list-origins > ~/installed-port-list
           2. Update your ports tree
           3. portmaster -ty --clean-distfiles
           4. portmaster --check-port-dbdir
           5. portmaster -Faf
           6. pkg_delete -a
           7. rm -rf /usr/local/lib/compat/pkg
           8. Back up any files in /usr/local you wish to save,
              such as configuration files in /usr/local/etc
           9. Manually check /usr/local and /var/db/pkg
              to make sure that they are really empty
           10. Re-install portmaster
           11. portmaster `cat ~/installed-port-list`
```

It is mandatory to recompile all ports after upgrading to the next higher major version of FreeBSD, otherwise you'll get exactly the kind of problems you've been experiencing.

Edit: The instructions haven't been updated yet for PKGNG, you have to use `pkg delete -a` at step 6.


----------



## tzoi516 (May 12, 2014)

kpa said:
			
		

> You could have avoided all this trouble if you had recompiled all installed ports after the upgrade from 9.2 to 10.0. The ports-mgmt/portmaster manual page portmaster(8) has instructions for doing just that:


This is a better link because the manual page link above returns "Sorry, no data found for `portmaster(8)'. Please try a keyword search."


----------



## kpa (May 12, 2014)

tzoi516 said:
			
		

> kpa said:
> 
> 
> 
> ...



I was sure the pman tag would work but apparently the manual pages are not being updated at http://freebsd.org/cgi/man.cgi. Anyway, if you have ports-mgmt/portmaster installed you'll have your local copy of the manual page viewable with `man portmaster`.


----------



## paradise (May 16, 2014)

Hello all!

I have installed portmaster, and ran `# portmaster -r pixman`. Some packages were installed, whose Perl, but /sunpoet/pciids-20131123.tar.xz was not found, too bad, it stops the other updates...  

I get a message with:

```
===> You can restart from the point of failure with this command line:
portmaster <flags> x11-servers/xorg-server
```
followed by many other ports (packages), what I have to do  now? Does it mean that many ports are not updated yet?

Anyway I still get the same message with `startx`: libpixman-1.so.9/file] not found. Maybe the most simple would consist in updating the all system with `portmaster`?


----------



## trh411 (May 16, 2014)

paradise said:
			
		

> Some packages were installed, whose Perl, but */sunpoet/pciids-20131123.tar.xz* was not found, too bad, it stops the other updates...


Update your ports tree, then re-try the portmaster(8) command from the point of failure. I show http://pci-ids.ucw.cz/ as the master site for misc/pciids, which means your Makefile is out-dated.


----------



## kpa (May 16, 2014)

trh411 said:
			
		

> paradise said:
> 
> 
> 
> ...



This is what it shows for me when I run `make -C /usr/ports/misc/pciids -V MASTER_SITES`:


```
http://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/ ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/
```

However, the older than 2014 files seem to have been removed from those sites. 

@paradise, as noted above, update your ports tree. What you now have seems to be from the time of the release of 10.0 or even older judging by the file names (pciids-20131123.tar.xz). You're supposed to keep up with updates to the ports tree by using one of the update methods given in the FreeBSD Handbook:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html


----------



## paradise (May 16, 2014)

Thank you all.

Alright, let'go, I'll update the ports with portsnap tonight, I'll use the same commands as for the first upgrade:


```
# portsnap fetch
# portsnap extract
# portsnap fetch
# portsnap update
```
Or only 


```
# portsnap fetch
# portsnap update
```
?


----------



## trh411 (May 16, 2014)

`portsnap fetch update` should be sufficient to bring your tree current. Note that you can combine the fetch and update sub-commands in a single command for simplicity.


----------



## paradise (May 17, 2014)

Hello !

So I ran :


```
# portsnap fetch update
```

I have rebooted, and I still get the same messages when i try to launch startx : *serverauth does not exist*, and l*ibpixman-1.so.9 not found*.

So I ran


```
# portmaster -r pixman
```

But the 'make' is blocked like on last time:


```
make: ... warning: Couldn't read shell's ouput for "usr/local/bin/X -version 2>&1
```

Maybe the best should consist in reinstalling FreeBSD ?  :OO


----------



## trh411 (May 17, 2014)

paradise said:
			
		

> Maybe the best should consist in reinstalling FreeBSD ?  :OO


After the re-install of FreeBSD-10.0, if you plan on building from source, remember to run `portsnap fetch update` *before* you build any ports. This would not apply if you plan on using packages.


----------

