pkg update problem - "no route host"

after upgrade system to 11.0

Code:
pkg: Warning: Major OS version upgrade detected. Running "pkg-static install -f pkg" recommended

pkg-static install -f pkg

Code:
pkg-static: Warning: Major OS version upgrade detected. Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
pkg-static: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
pkg-static: [URL='http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly/meta.txz:']http://pkg.FreeBSD.org/FreeBSD:11:am...erly/meta.txz:[/URL] No route to host
repository FreeBSD has no meta file, using default settings
pkg-static: [URL='http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly/packagesite.txz:']http://pkg.FreeBSD.org/FreeBSD:11:am...ckagesite.txz:[/URL] No route to host
Unable to update repository FreeBSD
Error updating repositories!

Try

wget http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly/meta.txz

Code:
connect pkg.freebsd.org (pkg.freebsd.org)|77.88.40.109|:80... 
error: Insufficient privileges.
repeat.

why?
 
'No route to host' indicates network configuration problems, usually a lacking or invalid default route. Try running netstat -nr, it should list at least one entry with default which indicates the so called default route; also known as the gateway used to access anything beyond your local network.

If it doesn't then that is your problem and you should set this up. See route(8) for more information on how to do this.
 
Code:
# service ipfw stop
net.inet.ip.fw.enable: 1 -> 0
net.inet6.ip6.fw.enable: 1 -> 0
# pkg-static install -f pkg
pkg-static: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
pkg-static: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
meta.txz                                 : 100%  944 B     0.9kB/s    00:01
packagesite.txz                          : 100%    6 MiB 983.7kB/s    00:06
Processing entries: 100%
FreeBSD repository update completed. 25860 packages processed.
All repositories are up to date.
Updating database digests format: 100%
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be DOWNGRADED:
        pkg: 1.10.0_2 -> 1.9.4_1

Number of packages to be downgraded: 1

3 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] pkg-1.9.4_1.txz                          : 100%    3 MiB 960.6kB/s    00:03
Checking integrity... done (0 conflicting)
[1/1] Downgrading pkg from 1.10.0_2 to 1.9.4_1...
Extracting pkg-1.9.4_1: 100%
# pkg2ng
Converting packages from /var/db/pkg
pkg: warning: database version 34 is newer than libpkg(3) version 33, but still compatible
pkg: sqlite error while executing INSERT OR ROLLBACK INTO pkg_search(id, name, origin) VALUES (?1, ?2 || '-' || ?3, ?4); in file pkgdb.c:1544: no such table: pkg_search
Analysing shared libraries, this will take a while...
pkg: warning: database version 34 is newer than libpkg(3) version 33, but still compatible
pkg: sqlite error while executing INSERT OR ROLLBACK INTO pkg_search(id, name, origin) VALUES (?1, ?2 || '-' || ?3, ?4); in file pkgdb.c:1544: no such table: pkg_search
 
I kill /var/db/pkg/*.sqlite

and recreate

pkg-static install -f pkg

pkg2ng

Code:
Converting p5-Term-ReadKey-2.30...
Installing p5-Term-ReadKey-2.30...
Converting zoneinfo-2012.h...
pkg: Unable to access file /usr/share/zoneinfo/America/Montreal: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/America/Santa_Isabel: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/America/Shiprock: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/Antarctica/South_Pole: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/Asia/Chongqing: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/Asia/Harbin: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/Asia/Kashgar: No such file or directory
pkg: Unable to access file /usr/share/zoneinfo/Asia/Rangoon: No such file or directory
Installing zoneinfo-2012.h...
Converting php5-soap-5.4.7...
Installing php5-soap-5.4.7...
Analysing shared libraries, this will take a while...
Checking all packages:   4%
(cmake-2.8.9) /usr/local/bin/ccmake - required shared library libmd.so.5 not found
(cmake-2.8.9) /usr/local/bin/ccmake - required shared library libstdc++.so.6 not found
(cmake-2.8.9) /usr/local/bin/cmake - required shared library libmd.so.5 not found
(cmake-2.8.9) /usr/local/bin/cmake - required shared library libstdc++.so.6 not found
(cmake-2.8.9) /usr/local/bin/cpack - required shared library libmd.so.5 not found
(cmake-2.8.9) /usr/local/bin/cpack - required shared library libstdc++.so.6 not found
(cmake-2.8.9) /usr/local/bin/ctest - required shared library libmd.so.5 not found
(cmake-2.8.9) /usr/local/bin/ctest - required shared library libstdc++.so.6 not found
Checking all packages:  18%
(iperf-2.0.5) /usr/local/bin/iperf - required shared library libstdc++.so.6 not found
Checking all packages:  31%
(mysql-client-5.1.66) /usr/local/bin/mysql - required shared library libstdc++.so.6 not found
(mysql-client-5.1.66) /usr/local/bin/mysqladmin - required shared library libstdc++.so.6 not found
(mysql-client-5.1.66) /usr/local/bin/mysqlbinlog - required shared library libstdc++.so.6 not found
(mysql-client-5.1.66) /usr/local/bin/mysqltest - required shared library libstdc++.so.6 not found
Checking all packages:  32%
(mysql-server-5.1.66) /usr/local/bin/mysql_client_test_embedded - required shared library libstdc++.so.6 not found
(mysql-server-5.1.66) /usr/local/bin/mysql_tzinfo_to_sql - required shared library libstdc++.so.6 not found
Checking all packages: 100%

Code:
(cmake-2.8.9) /usr/local/bin/cmake - required shared library libmd.so.5 not found
(cmake-2.8.9) /usr/local/bin/cmake - required shared library libstdc++.so.6 not found

(mysql-client-5.1.66) /usr/local/bin/mysql - required shared library libstdc++.so.6 not found
 
I kill /var/db/pkg/*.sqlite
Bad idea. This also removes the database with your currently installed packages.

Don't run pkg2ng(8). It's used to convert the old package databases to the new. FreeBSD 10.0 and higher do not have the old package database.
 
Back
Top