-
#1
Hello!
I just installed FreeBSD 11.1 RELEASE on my computer but currently I am having issues installing pkg
When I tried to install pkg, I have:
Code:
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest/Latest/pkg.txz: Not Found
I tried to use ping to check the network and it seems to work fine.
Am I using the correct package site? Am I doing something wrong?
Thanks
-
#2
What happens if you try to use
fetch
with this URL manually? The URL is correct, the file also exists, so I’m tempted to blame the problem on DNS. What happens if you try to use ping google.com
for example (on that same machine)?
Also, how are you trying to install PKG? You basically have 2 options: if you start
pkg
while it hasn’t been installed yet then this can trigger the bootstrap which will download and install a binary package. The other option is to install the port
ports-mgmt/pkg
manually.
-
#3
Hello!
I just installed FreeBSD 11.1 RELEASE on my computer but currently I am having issues installing pkg
When I tried to install pkg, I have:
Code:
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest/Latest/pkg.txz: Not Found
I tried to use ping to check the network and it seems to work fine.
Am I using the correct package site? Am I doing something wrong?
Thanks
That URL doesn’t seem correct to me; at least it should be http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest/All not http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest/Latest, and the archive name pkg-1.10.4.txz. So I’m guessing you’re using the wrong packagesite, that for the latest repo is http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest (Remember to override
pkg
‘s defaults in
/usr/local/etc/pkg/repos/FreeBSD.conf
).
Last edited: Jul 30, 2018
-
#5
Strange, indeed.
Can you try with
pkg-static install pkg
Or additionally, please try to get full package name from repository
pkg-static search pkg
and copy its full name
pkg-<version>.txz
to start installation.
Regards,
Krzysztof
-
Thread Starter
-
#6
Thanks for replying! Turns out I was using university’s ethernet service and they apparently gave some restrictions.
Anyway it works fine now and thanks for the suggestions.
-
#7
…Remember to override pkg’s defaults in /usr/local/etc/pkg/repo/FreeBSD.conf)
NB: According to
/etc/pkg/FreeBSD.conf
, the file to be customized is:
/usr/local/etc/pkg/repos/FreeBSD.conf
. Note the repos instead of just repo.
-
#8
NB: According to
/etc/pkg/FreeBSD.conf
, the file to be customized is:
/usr/local/etc/pkg/repos/FreeBSD.conf
. Note the repos instead of just repo.
Yup, right. Typo corrected.
After a fresh FreeBSD install in VMware or VirtualBox, you may encounter an issue where FreeBSD cannot connect to the Internet. Therefore when trying to ping a domain name [e.g., google.com], perform a system update, or install new packages via pkg, the system will return a DNS error.
I encountered this issue with FreeBSD 13 installs on VMware as well as VirtualBox.
This DNS issue is caused by a nameserver misconfiguration in the /etc/resolv.conf file and was initially reported here.
This troubleshooting tutorial will take about 5 minutes to complete if you have minimal experience with FreeBSD and a maximum of 30 seconds if you are an experienced user.
The DNS problem was not encountered when installing FreeBSD 13 on hardware but if you experience the symptoms below, this is a fix you might want to try.
Symptoms
- Pinging Google’s DNS server IP at 8.8.8.8 works, however pinging google.com will return the “Unknown host” output.
- When trying to update/upgrade the system with pkg, FreeBSD will return the following output:
“Looking up update. FreeBSD.org mirrors… none found. Fetching public key from update. FreeBSD.org […] failed. No mirrors remaining, giving up […] If unsupported, FreeBSD must be upgraded by source.”
- When using pkg to install a new package, FreeBSD will return the following output:
“pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:13 […] Address resolution failed […]”
Fixing The DNS issue in FreeBSD
- Luckily, this DNS resolution fix in FreeBSD is simple and straightforward. Log in on FreeBSD using your root account.
If you are already logged in using your normal user, type in the terminal the following command to switch to the root user. When prompted, type your root account password.
su -
- Edit the /etc/resolv.conf file by using the ee text editor available by default in FreeBSD.
cd /
ee /etc/resolv.conf
- Locate the nameserver field. As you can see, the nameserver is configured as localhost, respectively the 172.0.0.1 IP.
- Change the nameserver 172.0.0.1 IP to your localdomain. In my case, the 192.168.40.2 IP.
Alternatively, you can simply uncomment the first nameserver line with your local domain IP [your VMware/VirtualBox DNS server IP] and comment/remove the line with nameserver 172.0.0.1.
- Save the modified /etc/resolv.conf file.
Hold the ESC key and pressing ENTER. Select a) save changes and hit the ENTER key to save the new configuration.
Test the Internet Connection in FreeBSD
- Test the new address resolution configuration by pinging google.com as following:
ping google.com
- Perform a freeBSD system update using the following command:
freebsd-update fetch
NOTE: If there are any new updates in your FreeBSD system, you can proceed further with updates installation by using the freebsd-update install command.
- Use pkg to install a FreeBSD package, e.g., desktop-installer.
pkg install desktop-installer
Wrapping Up
In most cases when FreeBSD cannot connect to the Internet, VMware, VirtualBox, or otherwise, this issue is caused by some DNS misconfiguration in your system.
This tutorial shows you not only fix a DNS issue but also help you learn where the address resolution configuration is located in FreeBSD, in case you face similar issues in the future.
I hope this helps! If so, do me a favor and share this guide around on the Internet – I genuinely appreciate it!
But most importantly, stay safe.
Leonard Cucos
Leonard Cucos is an engineer with over 20 years of IT/Telco experience managing large UNIX/Linux-based server infrastructures, IP and Optics core networks, Information Security [red/blue], Data Science, and FinTech.
Hello to everyone.
I’ve just created my first jail and I’ve used the iocage script. What I want to try is to install clonos inside the jail,using the script below that I will run inside it :
ClonOS-pkg.ircdriven.net: { url: "https://pkg.ircdriven.net/packages/12amd64-clonos/", mirror_type: "none", enabled: yes }
Update pkg metafile and install it:
pkg update -f pkg install clonos
The problem is that it requires the ports tree,but I’m not able to install it because the error message you see below. I don’t understand if the network is not configured well or if there is a different error :
# zpool import
pool: zroot
id: 3547020836659149114
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier,though some features will not be available without an explicit 'zpool upgrade'. config:
zroot ONLINE
gptid/73565c3d-4021-11ec-84b1-e0d55ee21f22 ONLINE
# zpool import -fR /mnt/clonos zroot
# iocage activate zroot
#iocage fetch
[0] 11.2-RELEASE
[1] 11.3-RELEASE
[2] 11.4-RELEASE
[3] 12.0-RELEASE
[4] 12.1-RELEASE
[5] 12.2-RELEASE
[6] 13.0-RELEASE
Type the number of the desired RELEASE
Press [Enter] to fetch the default selection: (13.0-RELEASE)
Type EXIT to quit: 3
Fetching: 12.0-RELEASE
# iocage create -r 12.0-RELEASE -n clonos ip4_addr="em0|192.168.1.150/24"
# iocage start clonos
# iocage console clonos
Missing default rc.conf, creating it
clonos successfully created!
# iocage start clonos
* Starting clonos
+ Started OK
+ Using devfs_ruleset: 1000 (iocage generated default)
+ Using IP options: ip4.saddrsel=1 ip4=new ip6.saddrsel=1 ip6=new
+ Starting services OK
+ Executing poststart OK
# iocage list
+-----+--------+-------+--------------+-----+
| JID | NAME | STATE | RELEASE | IP4 |
+=====+========+=======+==============+=====+
| 1 | clonos | up | 12.0-RELEASE | - |
+-----+--------+-------+--------------+-----+
# iocage console clonos
FreeBSD 13.0-RELEASE-p4 (GENERIC) #0: Tue Aug 24 07:33:27 UTC 2021
Welcome to FreeBSD!
Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums: https://forums.FreeBSD.org/
Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.
Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier
Edit /etc/motd to change this login announcement.
root@clonos:~ # freebsd-version -u
12.0-RELEASE-p13
root@clonos:/usr/local # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
root@clonos:/usr/local # pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
root@clonos:/usr/local # find / -name mgmt
root@clonos:/usr/local # portsnap fetch extract
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching public key from portsnap.FreeBSD.org... failed.
No mirrors remaining, giving up.
root@clonos:/usr/local # ping 192.168.1.150
ping: ssend socket: Operation not permitted
At the beginning em0 had IP address = 192.168.1.6,after the jail creation it became 192.168.1.150,but it seems that I haven't any network connection inside the jail.
Содержание
- Как устнанавливать программы на FreeBSD?
- Solved pkg update returns in Permission denied and No route to host
- hilda
- SirDice
- hilda
- Problem upgrading jails (pkg, freebsd-update)
- poorandunlucky
- SirDice
- poorandunlucky
Как устнанавливать программы на FreeBSD?
portupgrade — это название ПО, используется для установки и апдейта ПО из исходников
или если без portupgrade
cd /usr/ports
make search name=zabbix
cd /usr/ports/папка с заббиксом
make install clean
вот и все
правильно собирать из исходников с нужными опциями, а не то, что собрал ктото в бинарник
рипозиторий на фре называется — порты, в генте — портажи
root@bsdtest:/usr/ports/ports-mgmt/portupgrade # make install clean
===> Building/installing dialog4ports as it is required for the config dialog
===> Cleaning for dialog4ports-0.1.6
/! ERROR: /!
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
Stop.
make[3]: stopped in /usr/ports/ports-mgmt/dialog4ports
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/ports-mgmt/dialog4ports
===> Options unchanged
/! ERROR: /!
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
Stop.
make[1]: stopped in /usr/ports/ports-mgmt/portupgrade
*** Error code 1
Stop.
make: stopped in /usr/ports/ports-mgmt/portupgrade
root@bsdtest:/usr/ports/ports-mgmt/portupgrade #
Это что получается версия ОС у меня «не той системы»?
2. По второму не понятно, откуда возьмется эта папка cd /usr/ports/папка с заббиксом?
Или подразумевается, что я должен в ней распаковать архив, который скачал с оф. сайта Zabbix?
Ports Collection support for your FreeBSD version has ended,
— порты старые, нужно обновить
portsnap fetch
portsnap update
и еще раз устанавливаем portupgrade
Или подразумевается, что я должен в ней распаковать архив, который скачал с оф. сайта Zabbix?
нет, после запуска make в порте происходит скачивание исходников в /usr/ports/distfiles, распаковка и сборка (самому исходники скачивать не нужно, в этот удобство source-based систем)
make install — это когда make завершился без ошибок — инсталируем ПО. В это время конфиги отправляются как правило в /usr/local/etc, а бинарники или скрипты в /usr/local/bin, /usr/local/sbin
p.s.
на фре есть четкое разделение пользовательских программ от системных. В /usr/local/etc — пользовательские конфиги, в /etc — системные. Аналогично с папками для бинарников/скриптов /usr/local/bin, /usr/local/sbin — ПО пользователя, /usr/bin, /usr/sbin/, /bin, /sbin — ПО системы
# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors. 4 mirrors found.
Fetching snapshot tag from ipv4.aws.portsnap.freebsd.org. done.
Fetching snapshot metadata. done.
Updating from Fri Jul 31 16:32:02 +09 2020 to Mon Aug 3 10:28:50 +09 2020.
Fetching 4 metadata patches. done.
Applying metadata patches. done.
Fetching 0 metadata files. done.
Fetching 164 patches.
(164/164) 100.00% done.
done.
Applying patches.
done.
Fetching 3 new ports or files. done.
root@bsdtest:
# portsnap update
Removing old files and directories. done.
Extracting new files:
/usr/ports/MOVED
/usr/ports/archivers/php-snappy/
/usr/ports/astro/xearth/
/usr/ports/audio/exhale/
/usr/ports/audio/fasttracker2/
/usr/ports/audio/faudio/
/usr/ports/audio/libopenmpt/
/usr/ports/audio/qjackctl/
/usr/ports/audio/qsynth/
/usr/ports/audio/sound-juicer/
/usr/ports/databases/mariadb105-server/
/usr/ports/databases/mdbtools/
/usr/ports/databases/mysql56-server/
/usr/ports/databases/pear-DB/
/usr/ports/databases/pecl-couchbase/
/usr/ports/databases/pymongo/
/usr/ports/databases/sqlite3/
/usr/ports/databases/tiledb/
/usr/ports/deskutils/calibre/
/usr/ports/devel/R-cran-bit/
/usr/ports/devel/R-cran-bit64/
/usr/ports/devel/binutils/
/usr/ports/devel/codeblocks/
/usr/ports/devel/folly/
/usr/ports/devel/gitaly/
/usr/ports/devel/jetbrains-clion/
/usr/ports/devel/jetbrains-phpstorm/
/usr/ports/devel/libfmt/
/usr/ports/devel/libgsf/
/usr/ports/devel/py-cfgv/
/usr/ports/devel/py-hvac/
/usr/ports/devel/py-pathlib/
/usr/ports/devel/py-py/
/usr/ports/devel/py-tblib/
/usr/ports/devel/spdlog/
/usr/ports/dns/dnsdist/
/usr/ports/editors/emacs-devel/
/usr/ports/editors/nvi2/
/usr/ports/editors/vim/
/usr/ports/emulators/rpcs3/
/usr/ports/emulators/yuzu-qt5/
/usr/ports/emulators/yuzu/
/usr/ports/emulators/zsnes/
/usr/ports/finance/fava/
/usr/ports/games/homura/
/usr/ports/games/keeperrl/
/usr/ports/graphics/Makefile
/usr/ports/graphics/ftgl/
/usr/ports/graphics/mesa-devel/
/usr/ports/graphics/openimageio/
/usr/ports/graphics/py-openimageio/
/usr/ports/graphics/wayland-utils/
/usr/ports/graphics/webp-pixbuf-loader/
/usr/ports/irc/inspircd/
/usr/ports/japanese/font-myrica/
/usr/ports/japanese/font-myricam/
/usr/ports/java/apache-commons-pool/
/usr/ports/java/icedtea-web/
/usr/ports/java/openjdk8/
/usr/ports/java/visualvm/
/usr/ports/lang/chibi-scheme/
/usr/ports/lang/gcc10-devel/
/usr/ports/lang/gcc10/
/usr/ports/lang/gcc8-devel/
/usr/ports/lang/intel-compute-runtime/
/usr/ports/lang/nim/
/usr/ports/lang/smlnj/
/usr/ports/mail/isbg/
/usr/ports/mail/postfix-current/
/usr/ports/mail/roundcube-contextmenu/
/usr/ports/math/e-antic/
/usr/ports/math/libsemigroups/
/usr/ports/math/nfft/
/usr/ports/math/py-gmpy2-devel/
/usr/ports/math/py-kiwisolver/
/usr/ports/math/py-spectral/
/usr/ports/math/wxmaxima/
/usr/ports/misc/openhantek/
/usr/ports/multimedia/ffmpegthumbnailer/
/usr/ports/multimedia/gpac-libgpac/
/usr/ports/multimedia/gpac-mp4box/
/usr/ports/multimedia/kodi-devel/
/usr/ports/multimedia/kodi/
/usr/ports/multimedia/libmatroska/
/usr/ports/multimedia/libvpx/
/usr/ports/multimedia/mlt/
/usr/ports/multimedia/vapoursynth/
/usr/ports/net-im/ejabberd/
/usr/ports/net-im/kaidan/
/usr/ports/net-im/mtxclient/
/usr/ports/net-im/nheko/
/usr/ports/net-im/purple-discord/
/usr/ports/net-im/telepathy-farstream/
/usr/ports/net-mgmt/prometheus2/
/usr/ports/net-mgmt/py-snmp_passpersist/
/usr/ports/net-p2p/xmrig/
/usr/ports/net/appkonference/
/usr/ports/net/cloudflared/
/usr/ports/net/echoping/
/usr/ports/net/exabgp4/
/usr/ports/net/google-cloud-sdk/
/usr/ports/net/haproxy-devel/
/usr/ports/net/haproxy/
/usr/ports/net/haproxy19/
/usr/ports/net/haproxy20/
/usr/ports/net/haproxy21/
/usr/ports/net/kitinerary/
/usr/ports/net/knxd/
/usr/ports/net/liveMedia/
/usr/ports/net/nng/
/usr/ports/net/py-GeoIP2/
/usr/ports/net/py-maxminddb/
/usr/ports/net/py-pyzmq/
/usr/ports/net/quagga/
/usr/ports/net/rsocket-cpp/
/usr/ports/net/vinagre/
/usr/ports/net/yaz/
/usr/ports/science/elmerfem/
/usr/ports/science/qiskit-aer/
/usr/ports/science/vipster/
/usr/ports/security/acme.sh/
/usr/ports/security/fizz/
/usr/ports/security/modsecurity3-nginx/
/usr/ports/security/oidentd/
/usr/ports/security/py-dfvfs/
/usr/ports/security/snort2pfcd/
/usr/ports/security/teleport/
/usr/ports/security/vuxml/
/usr/ports/security/yubico-piv-tool/
/usr/ports/sysutils/Makefile
/usr/ports/sysutils/bsdisks/
/usr/ports/sysutils/consul/
/usr/ports/sysutils/di/
/usr/ports/sysutils/duplicity/
/usr/ports/sysutils/lizardfs/
/usr/ports/sysutils/mackerel-agent/
/usr/ports/sysutils/py-borgmatic/
/usr/ports/sysutils/py-rdiff-backup/
/usr/ports/sysutils/rundeck3/
/usr/ports/sysutils/u-boot-master/
/usr/ports/sysutils/u-boot-qemu-riscv64/
/usr/ports/textproc/consul-template/
/usr/ports/textproc/gtk-doc/
/usr/ports/textproc/py-wtf-peewee/
/usr/ports/textproc/sd/
/usr/ports/textproc/sigil/
/usr/ports/textproc/zxing-cpp/
/usr/ports/www/chromium/
/usr/ports/www/envoy/
/usr/ports/www/gitlab-ce/
/usr/ports/www/librtcdcpp/
/usr/ports/www/nextcloud-tasks/
/usr/ports/www/nginx/
/usr/ports/www/qutebrowser/
/usr/ports/www/threejs/
/usr/ports/x11-fm/fsv2/
/usr/ports/x11-fonts/Makefile
/usr/ports/x11-fonts/font-awesome/
/usr/ports/x11-fonts/libertinus/
/usr/ports/x11-fonts/spleen/
/usr/ports/x11-servers/xorg-server/
/usr/ports/x11-servers/xwayland-devel/
/usr/ports/x11-wm/xfce4-wm/
/usr/ports/x11/alacritty/
/usr/ports/x11/dmenu/
/usr/ports/x11/libX11/
/usr/ports/x11/waybar/
Building new INDEX files. done.
# cd /usr/ports/ports-mgmt/portupgrade && make install clean
===> Building/installing dialog4ports as it is required for the config dialog
===> Cleaning for dialog4ports-0.1.6
/! ERROR: /!
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
Stop.
make[3]: stopped in /usr/ports/ports-mgmt/dialog4ports
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/ports-mgmt/dialog4ports
===> Options unchanged
/! ERROR: /!
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
Stop.
make[1]: stopped in /usr/ports/ports-mgmt/portupgrade
*** Error code 1
Stop.
make: stopped in /usr/ports/ports-mgmt/portupgrade
Источник
Solved pkg update returns in Permission denied and No route to host
hilda
Hi,
I have problems with two FreeBSD 11.2-RELEASE-p8 prod machines when I try to run “pkg update”. The two machines is pretty much the same as one is master an the other is slave. They only get files from other servers via scp every hour and analyse them with some scripts, that’s it.
I installed 11.1 before and updated to 11.2 for some month ago. Everything worked perfect for some time with the updates etc. Recently, I can’t run “pkg update” any more. Freebsd-update fetch etc. works, it’s only pkg that’s is the problem.
On one machine I get:
I got the same on the other machine before (I think) and tried to reinstall pkg, but it won’t work. So I get this:
This is the info of the machines:
I have tried # pkg -o OSVERSION=1102000 update -f but no luck.
In /usr/local/etc/pkg.conf I tried:
The servers have deleted /var/db/pkg/repo-FreeBSD.sqlite. I have one backup repo-FreeBSD.sqlite.xz on one server, and I tried it, doesn’t work.
I have url: «pkg+http://pkg.FreeBSD.org/$/latest», in /etc/pkg/FreeBSD.conf .
DNS etc. works fine on the servers.
Does someone have some tip?
SirDice
Administrator
«No route to host» means you’re not online or there’s a firewall blocking your outgoing traffic. «Permission denied» might be caused by a proxy on your network.
hilda
Tnx for the answer… Did some tests here.
(OK… you can skip this section if you don’t want to read about my stupid…. Yheaaa.. the fix is in the last section)
My dmz-customer-net is back off multiply firewalls there I don’t control all of them.. The easiest way to control it was to set up a new machine on the same net, and it worked! No problem with any firewall or proxy.
I scp the brand new repo-FreeBSD.sqlite to one of the broken machine. I also made the /use/local/etc/pkg/repos/FreeBSD.conf file with:
Now I have 3 FreeBSD 11.2 boxes side by side (same net, same nameservers etc.). 2 is broken (old ones) and one with a clean install that work with pkg update. Same uname -a/UK.
The net (and applications) on the two broken machines work perfectly, it’s only # pkg update I get No route to host.
[The Fix]
In the middle when I write this.. Can it be my pf on the box? I have tcpdump with fplog0 running and nothing (I log more or less everything). But I have some heavy rules so I disable them with # pfctl -d and bam… it worked..
A couple a mount without pkg update and struggling to get it on track.. my own pf.. stupid stupid stupid…. You never ever learn.
So something had happen with the package repo, pf or something else. Time to go through the pf rules.
Tnx for the help.. sometime you need a kick somewhere.
Источник
Problem upgrading jails (pkg, freebsd-update)
poorandunlucky
So I have these jails now, and I want to install Samba on my www jail.
I’ve upgraded to 12.2-p6, pkg -vv shows kernel 120200.
I’ve upgraded my jail with freebsd-update -b /jails/www
There was an error, some directories for the certificates under /usr/share/[certs]/[trusted/blacklisted] didn’t exist, so freebsd-update failed up upgrade those files in there, I manually created the directories. Re-running freebsd-update -b says there’s nothing to do.
Going back to the jail, and running pkg -vv shows osversion 120100.
Here’s the log from my last transactions before posting here.
Where did I screw-up?
Also: hello *waves*
SirDice
Administrator
freebsd-update fetch install only downloads and installs patches for the version it has now. Your jail appears to be 12.1-RELEASE, you probably never upgraded it. It’s not automagically upgraded when you upgrade the host OS. You need to use freebsd-update -r 12.2-RELEASE upgrade on the jail.
poorandunlucky
freebsd-version -u shows 12.2-RELEASE-p6 from both the base OS, and from inside the jail (through jexec ).
Running pkg from inside the jail tells me
pkg: http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/samba411-4.11.8.txz: Not Found
Running pkg -j www samba411 install gives me
Newer FreeBSD version for package php73-pear-channel-symfony: To ignore this error set IGNORE_OSVERSION=yes — package: 1202000 — running kernel: 1201000
I tried running freebsd-update -b /jails/www -r 12.2-RELEASE as well, and it’s also telling me it’s already at that version.
Related yet Unrelated Questions:
What’s good practice with jails? Working on them by opening a shell, or operating from the base OS through the —jail options when possible? Like upgrading, should I do it from the jail, or with the freebsd-update -b option?
Howcome trying to install samba from a jail shell tells me the package can’t be found, but works fine if I do it from the base OS with the -j option? Seems like at that stage it should just be downloading a file, I don’t understand the error.
And back to the main issue, considering both the base OS, and the jail are at 12.2-RELEASE, howcome I’m getting that error?
I made a snapshot, I could override, and rollback if it doesn’t work, but I’d just like to understand, I’m not experienced with jails so I think I’m probably doing something wrong in my system administration, so I’d like to take good habits, rather than build a pile of mistakes. I’m kinda proud of my OS right now, and aside my personal folder being a mess, my server is pretty nice, and I don’t want to feel like I want to wipe it and start over again. It’s running well, it’s useful, and I really like it (obviously, I’m still here).
Like when you upgrade your jails, what do you do? I assume they’re on their own dataset, and all. I build them with bsdinstall, and then I open shells inside with jexec, or I’ll use the -j option that I think just chroots to the jail basedir when appropriate in the script, so I mix the two without caring much, but is there deeper stuff I’m missing?
I even ran pkg update from inside the jail, maybe it needed to update its file that tells it the kernel version (I don’t know where it gets it from, that might acttually be a good place to start tracking backwards, if you can help).
I’m just really stumped by that problem, everything was going so smoothly I thought everything was in order. I don’t want to update to the newest release yet because I don’t want to go through all the config right now, I just want samba on the www server at this time. I’ll enjoy going that road later, but right now I just want to get this sorted out to make sure everything’s fine, and I’m not going to screw everything up again. and make a little website just to refresh myself, and show something to someone (which is what I set out to do in the first place, I’m also trying to remain focussed on my objective).
I have samba on another jail, and it’s running fine, I use it every day, all my files are there now, besides the obligatory stuff I have to keep local to Windows, everything goes on my file server, even game recordings from Windows, everything’s set to save to my Samba network drive that’s my home folder on that jail. been running for like a year like that now. I want to put Nextcloud on it, re-setup my DNS, I lost a lot of files because of Windows and Microsoft-related issues, and carelessness, and disorganization, plus I’m kinda depressed, and I also took up electronics as a hobby, so it’s not going very fast, but at least I think it’s fairly solid now. It could just be the package script that has a typo, or it could be something I’ve done improperly, and I want to know because I really like my server.
I don’t understand why that error, and like I said, I don’t want to screw things up anymore, or any more. Just asking for jail best practices, and clues where to look for the problem.
FreeBSD is very important to me, not only is it cool to watch debug messages whiz through on a console window, but it also speaks «my language» it just makes sense to me, I’m actually very passionate about it, I didn’t choose it over Ubuntu because I liked the logo, the way it’s organized, and the way the people who make it write, the code, the structure, it just. I think it’s beautiful, I find beauty in it, and because it’s so rare to find something like that, well, I keep. trying. *shrugs*
. and yes, even though I’ve been absent for a while, I’ve thought about you a few times, if you wonder, , wondering, and hoping, that you’re healthy, and happy.
You’ve always tried to help, and I appreciate, even if you weren’t always helpful.
(sure spilled my heart out there. i hope i don’t regret it in the morning lol )
Источник
Jun 01, 2020
I work at Microsoft, and with that, I get free
Azure credits.
Considering where I work, I have no use for FreeBSD at work, only Windows.
However, I spent seven years of my life prior to getting $DAYJOB using
FreeBSD, going back to high school and basically built my personal setup on
it. I haven’t bothered to switch my personal desktop or home server to
Windows (yet*), so I’ll create a FreeBSD VM in Azure and try to update it.
If I create a FreeBSD VM in Azure and update, I get pkg
errors as follows:
root@Inst1:/usr/home/neel # pkg upgrade
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 916 B 0.9kB/s 00:01
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100% 6 MiB 6.5MB/s 00:01
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!
root@Inst1:/usr/home/neel #
To fix, this you need to re-bootstrap pkg
as follows:
root@Inst1:/usr/home/neel # pkg-static bootstrap -f
pkg(8) is already installed. Forcing reinstallation through pkg(7).
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.13.2...
package pkg is already installed, forced install
Extracting pkg-1.13.2: 100%
root@Inst1:/usr/home/neel #
And then update as normal:
root@Inst1:/usr/home/neel # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 3.3MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 31517 packages processed.
All repositories are up to date.
root@Inst1:/usr/home/neel # pkg upgrade
Updaing FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
...
Proceed with this action? [y/N]: y
...
I do recommend updating to a non-EOL release first, as the Azure images may
be out of date, as they are for 12.x.
At the time of writing, I don’t work on Azure, so I have no say in how often
FreeBSD images are updated.
* — Personal desktop/laptop does dual-boot Windows 10 and FreeBSD CURRENT
Модераторы: vadim64, terminus
Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
-
Torvald
- рядовой
- Сообщения: 27
- Зарегистрирован: 2010-12-31 2:30:53
- Откуда: Днепропетровск
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Добрый день, товарищи!
Столкнулся с такой бедой: с недавнего времени исчезли все пакеты с оф. сайтов Фряхи и её зеркал касательно версий 10.0 — 10.4.
Что делать? где их можно достать?
На
http://pkg.FreeBSD.org/FreeBSD:10:amd64
нету, ладно, понимаю устаревшая.
На
ftp://ftp-archive.freebsd.org/
тоже нету!
Все версии есть и 6, 7….9, но вот именно 10.х нету!
Что с ней не так?
Предлагать обновиться -> не предлагать мать специфическая, все фряхи выше 10.4, на ней уходят в кернел паник, да и софта на том серваке за годы поднакопилось разного….
(Банально в одной из jail если сделать: pkg
Код: Выделить всё
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz: Not Found
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
-
Хостинг HostFood.ru
Услуги хостинговой компании Host-Food.ru
Хостинг HostFood.ru
Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/
-
snorlov
- подполковник
- Сообщения: 3918
- Зарегистрирован: 2008-09-04 11:51:25
- Откуда: Санкт-Петербург
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
snorlov » 2021-02-26 10:10:15
А посмотреть http://ftp-archive.freebsd.org/pub/Free … SO-IMAGES/ религия не позваляет и еще, у вас насколько я понял уже стоит 10.4, спрашивается что еще надо…, если уж требуется обновлять софт, то надо почитать документацию по pkg и сделать свой репозитарий, и там соответственно собирать пакаджи, т.е. ставить 10.4 закачивать новые порты и собирать пакаджи, выискивая ошибки при сборки и их работоспособность.
-
guest
- проходил мимо
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
guest » 2021-02-26 10:27:38
Столкнулся с такой бедой: с недавнего времени исчезли все пакеты с оф. сайтов Фряхи и её зеркал касательно версий 10.0 — 10.4.
Что делать? где их можно достать?
нигде.
1) попробовать собрать в poudriere
2) взять с DVD от релиза (понятно что там не все пакеты)
10.x = EOL
Ну а то что FreeBSD перестала сохранять последний срез пакетов для EOL,
это печально, согласен.
-
Torvald
- рядовой
- Сообщения: 27
- Зарегистрирован: 2010-12-31 2:30:53
- Откуда: Днепропетровск
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Torvald » 2022-07-12 23:01:18
К сожалению, данная ссылочка уже не работает
Может кто-то знает ещё зеркала пакетов старых версий Фряхи? (В частности 10-ки)
-
Demis
- прапорщик
- Сообщения: 486
- Зарегистрирован: 2015-05-25 14:36:32
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Demis » 2022-07-13 14:32:57
Дык это…
Писали-же…
snorlov писал(а): ↑
2021-02-26 10:10:15
snorlov » 2021-02-26 10:10:15
А посмотреть http://ftp-archive.freebsd.org/pub/Free … SO-IMAGES/[/url] религия не позваляет и еще, у вас насколько я понял уже стоит 10.4, спрашивается что еще надо…, если уж требуется обновлять софт, то надо почитать документацию по pkg и сделать свой репозитарий, и там соответственно собирать пакаджи, т.е. ставить 10.4 закачивать новые порты и собирать пакаджи, выискивая ошибки при сборки и их работоспособность.
Посмотрел сейчас линк — файлы вроде видны и запрос на скачку выдает.
Правда не пробовал качать…
-
Torvald
- рядовой
- Сообщения: 27
- Зарегистрирован: 2010-12-31 2:30:53
- Откуда: Днепропетровск
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Torvald » 2022-07-14 13:31:04
Дык не то…)
Саму Фряху найти то не проблема, а коллекцию пакетиков к ней, вот где проблема.
С портов, к сожалению, уже далеко не всё компилируется, да и не всегда это нужно. А пакеты удобно.., но вот зеркало из поста выше уже не доступно.
-
Demis
- прапорщик
- Сообщения: 486
- Зарегистрирован: 2015-05-25 14:36:32
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Demis » 2022-07-14 13:55:42
Так-с, понял.
Хотя мне казалось, что всегда был какой-то из исошников на котором порты присутствовали.
И при некотором колдунстве их можно было тянуть с диска.
Но может это, просто, напекло голову жаркое солнце…
-
Demis
- прапорщик
- Сообщения: 486
- Зарегистрирован: 2015-05-25 14:36:32
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Demis » 2022-07-15 8:52:52
С утра еще вспомнилось…
Когда у нас база портов установлена, то при сборке порта мы видим лог.
В котором, например, используются еще некие порты при сборке.
При этом сборщик уже не находит нужного порта в репозитариях.
Но зато мы четко видим имя нужного, конкретного, файла (даже MD5 от него получаем).
А дальше тупо его гуглим, скачиваем, перепроверяем md5, укладываем в /usr/ports/distfiles , собираем снова.
Если опять не хватает, повторяем поиск очередного «недостатка».
Иногда это приходится делать несколько раз.
При этом можно столкнуться на «пересечении», когда подпорт есть, установлен, но он новее, а прога хочет именно старый.
Но тут тоже можно по-шаманить разного рода способами.
В общем это просто последовательность действий, алгоритм, его можно применить почти к любой версии систем.
Когда-то столкнулся с подобной проблемой, но примерно так и разрулил.
Было-бы желание…
-
guest
- проходил мимо
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
guest » 2022-07-15 18:37:46
Непрочитанное сообщение Demis » 2022-07-14 13:55:42
Так-с, понял.
Хотя мне казалось, что всегда был какой-то из исошников на котором порты присутствовали.
И при некотором колдунстве их можно было тянуть с диска.
Но может это, просто, напекло голову жаркое солнце…
на ftp-archive есть только пакеты что идут в dvd-iso, старые pkg repo, даже квартальные, никто
не хранит, слишком большие объемы.
-
Alex Keda
- стреляли…
- Сообщения: 35413
- Зарегистрирован: 2004-10-18 14:25:19
- Откуда: Made in USSR
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Alex Keda » 2022-07-16 21:48:17
насчёт не компилируется…
у меня вот на десктопе стоит kde4 и вполне себе современный firefox99
как и всё окружение
спаибо zfs и привычке делать снэпшот до того как потрогать очередного кандидата на обновление
Убей их всех! Бог потом рассортирует…
-
Alex Keda
- стреляли…
- Сообщения: 35413
- Зарегистрирован: 2004-10-18 14:25:19
- Откуда: Made in USSR
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Alex Keda » 2022-07-16 21:48:38
правда, под 13.1
Убей их всех! Бог потом рассортирует…
-
Torvald
- рядовой
- Сообщения: 27
- Зарегистрирован: 2010-12-31 2:30:53
- Откуда: Днепропетровск
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
Torvald » 2022-08-01 12:54:54
Спасибо огромное ВСЕМ!!! Последняя ссылка, в яблочко! Снимаю шляпу перед Вами astroncia!
-
vvivanov
- рядовой
- Сообщения: 23
- Зарегистрирован: 2010-01-06 10:53:54
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
vvivanov » 2022-11-14 21:44:34
подскажите пожалуйста. заменил адрес в /etc/pkg/FreeBSD.conf на зеркало выше, но не скачиваются пакеты.
Код: Выделить всё
url: "pkg+https://mirrors.xtom.ee/${ABI}/quarterly",
Код: Выделить всё
pkg: Error fetching https://mirrors.xtom.ee/FreeBSD:11:amd64/quarterly/Latest/pkg.txz: Not Found
если я правильно понял, то проблема с двоеточиями, так как
Код: Выделить всё
wget https://mirrors.xtom.ee/freebsd-pkg/FreeBSD%3A11%3Aamd64/quarterly/Latest/pkg.txz
прекрасно скачал.
-
iZEN
- ст. лейтенант
- Сообщения: 1095
- Зарегистрирован: 2007-09-15 16:45:26
- Контактная информация:
C оф. сайтов фряхи исчезли пакеты FreeBSD 10
Непрочитанное сообщение
iZEN » 2022-12-08 20:49:33
Да уж, приоритеты у всех разные… Кому-то приходится терпеть старую плату и накатывать на неё устаревший хлам с разных интернет-помоек, вместо того, чтобы отнести компьютерную рухлядь на помойку и купить взамен новый компьютер, чтобы накатить на него свежий софт.
GNU/Linux — это не Unix и даже никогда им не был, и, что самое смешное, никогда им не станет — GNU’s Not Unix
I’ve set up a packer template to generate vagrant base image of FreeBSD 10.3 and it was working well at least Mon Oct 3 00:34:41 2016 +0300.
Yesterday I was going to continue my work on this project and it turned out this is not working anymore. So here come details.
Packer does what it have to do, then runs my script to install FreeBSD by using bsdinstall(8)
with the following script:
PARTITIONS="ada0 { 29G freebsd-ufs /, 5G freebsd-swap, 10G freebsd-ufs /var }"
DISTRIBUTIONS="base.txz kernel.txz"
#!/bin/sh
echo 'WITHOUT_X11="YES"' >> /etc/make.conf
echo 'OPTIONS_UNSET=X11' >> /etc/make.conf
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
cat >> /etc/rc.conf <<EOF
ifconfig_em0="DHCP"
sshd_enable="YES"
dumpdev="NO"
EOF
env ASSUME_ALWAYS_YES=1 pkg bootstrap # <<stops here
pkg update
pkg install -y sudo
[.....snip.....]
reboot
This stops at bootstrapping pkg with the message:
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly, please wait...
Signature for pkg not available.
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz.sig: Connection reset by peer
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
If I stop the bsdinstall script and chroot /mnt /bin/sh
I can fetch pkg.txz.sig
from the above URL without any problems.
Any ideas what could be the reason of the «connection reset by peer»? Something was changed on the pkg.FreeBSD.org recently?
I couldn’t find anything about the issue.
UPD1
Looking at the captured traffic — the site really answers 200OK and then drops the connection for the pkg.txz.sig
file.
But this 200OK packet contains the signature file and they are identical for both manual fetch
(which succeeds) and pkg bootstrap
(which fails)
Both sessions are identical, so this is likely not a networking problem.
UPD2
The truss
was not helpful either.
So as a workaround I’ve just modified my bsdinstall script to fetch files manually:
[.....snip.....]
#env ASSUME_ALWAYS_YES=1 pkg bootstrap
fetch http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz
fetch http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz.sig
pkg add pkg.txz
pkg update
[.....snip.....]
PS: The only thing that I can suspect now is the virtualbox version update… anyway downgrading is not an option. (ISO checksum is hardcoded into the template, the template and scripts are in git repository, so accidential changes are impossible)
UPD3
I’ve set up a debugging environment, for the moment I only isolated the function where the error is raised.
It’s the second buffer refill from the http connection (while the first one has already read 727 bytes — it should be EOF)…
Here is small gdb log with backtrace and breakpoints to get there.
Added tcpdump capture made on the system (wireshark compatible).