Error: Error: Failed to download metadata for repo 'advanced-virtualization': Cannot prepare internal mirrorlist: No URLs in mirrorlist - redhat

I am using RHEL 9.1 machine where I am trying to install a package 'python3-distro' but I am getting error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot prepare internal mirrorlist: No URLs in mirrorlist
can anyone please help me resolve this issue?
I was expecting 'sudo dnf install python3-distro' to work successfully.
I tried running below cmds:
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*
and as result after reboot I am getting below error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Output- ls 'yum.repos.d'
$ls /etc/yum.repos.d/
advanced-virtualization.repo nfv-openvswitch.repo redhat.repo
ceph-pacific.repo rdo-release.repo
messaging.repo rdo-testing.repo
Any help would be appreciated.

Related

postgresql command not working; Error: invalid option '-o'

I am trying to fix this previous error when I am unable to find the PostgreSQL client library, however, when I run the suggested command:
ridk exec sh -c "pacman -S ${MINGW_PACKAGE_PREFIX}-postgresql"
I get this error. Not sure how to fix, any help is appreciated
error: invalid option '-o'
I tried the other suggestions such as:
gem install pg -- --with-pg-config=/path/to/pg_config
But I still get the same error.

yarn kbn bootstrap failed while trying to prepare kibana dev env

I am trying to generate the Kibana plugin and for that I already downloaded the .zip file from the github.
However while preparing for the Kibana development environment, I got an error as mentioned below from yarn kbn bootstrap cmd:
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD fatal: Not a valid object name HEAD
Note:
I already sudo git init
Steps followed so far
sudo wget https://github.com/elastic/kibana/archive/refs/tags/v7.17.0.zip
sudo apt-get install unzip
sudo unzip v7.17.0.zip
sudo mv kibana-v7.17.0 kibana
sudo chmod -R 777 kibana-7.17.0
sudo yarn add require-in-the-middle
sudo yarn add symbol-observable
sudo yarn add source-map-support
sudo yarn add lodash
sudo git init
sudo yarn kbn bootstrap -- failed
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD
fatal: Not a valid object name HEAD

Error trying to upgrade Raspbian (Jessie)

When trying to upgrade my Raspbian (8.0 jessie) on my Raspberry Pi 2 with sudo apt-get upgrade, I'm getting the following error:
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/perl_5.20.2-3+deb8u12_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/perl/5.20.2/auto/Unicode/Collate/Collate.so' to
'/usr/lib/arm-linux-gnueabihf/perl/5.20.2/auto/Unicode/Collate/Collate.so.dpkg-new': unexpected end of file or stream
Preparing to unpack .../perl-base_5.20.2-3+deb8u12_armhf.deb ...
Unpacking perl-base (5.20.2-3+deb8u12) over (5.20.2-3+deb8u6) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/perl-base_5.20.2-3+deb8u12_armhf.deb (--unpack):
cannot copy extracted data for './usr/share/perl/5.20.2/unicore/lib/Nt/Nu.pl' to
'/usr/share/perl/5.20.2/unicore/lib/Nt/Nu.pl.dpkg-new': unexpected end of file or stream
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/perl_5.20.2-3+deb8u12_armhf.deb
/var/cache/apt/archives/perl-base_5.20.2-3+deb8u12_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Does anyone have any ideas?
I've already done sudo apt-get update and sudo apt-get clean.
The deb file itself is corrupt.
You can remove it, and run update/upgrade again. It will download a new version.
Like this:
cd /var/cache/apt/archives
sudo rm perl_5.20.2-3+deb8u12_armhf.deb
sudo apt-get update
sudo apt-get upgrade -y

Build of docker image with centos:6.6 fails when trying to update repo

I have the following simple Dockerfile:
FROM centos:6.6
USER root
RUN yum clean all
RUN yum update
And I am trying to build it as usual:
docker build -t myimage/hadoop .
But I have the following error and I can't find the solution:
Error: Cannot find a valid baseurl for repo: base Could not retrieve
mirrorlist
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock
error was 14: PYCURL ERROR 6 - "Couldn't resolve host
'mirrorlist.centos.org'" INFO[0005] The command "/bin/sh -c yum
update" returned a non-zero code: 1
Any help or reference to solve the problem would be very helpful.
EDIT: I tried the solution given in this post but with no results.
Could you try add "-y" to the ""yum update"?
RUN yum update -y

installing mongodb with pecl

this is what i get:
bitnami#ip-10-117-57-211:/bin$ sudo pecl install mongo
downloading mongo-1.4.0.tgz ...
Starting to download mongo-1.4.0.tgz (138,495 bytes)
..............................done: 138,495 bytes
84 source files, building
WARNING: php_bin /opt/bitnami/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Can't load '/opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /opt/bitnami/perl/lib/5.8.8/i686-linux/XSLoader.pm line 70.
at /opt/bitnami/perl/lib/5.8.8/i686-linux/Data/Dumper.pm line 36
Compilation failed in require at /usr/share/autoconf/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/C4che.pm line 33.
Compilation failed in require at /usr/bin/autom4te line 38.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 38.
ERROR: `phpize' failed
Any ideas how to fix?
Try configuring manually as it seems bitnami is a bit funky:
$ sudo apt-get update
$ sudo apt-get install build-essential libtool autoconf unzip wget
Download the latest source code from the web page, uncompress it and compile the module.
$ wget http://pecl.php.net/get/mongo-1.4.3.tgz
$ tar -zxf mongo*
$ export PHP_AUTOCONF=/usr/bin/autoconf
$ export PHP_PREFIX=/opt/bitnami/php
$ cd mongo-*
$ /opt/bitnami/php/bin/phpize
$ ./configure
$ make
$ sudo make install
Adapted from: http://wiki.bitnami.com/Components/PHP#How_to_install_OAuth_module.3f
well i finally got it working. I ran through the steps to install mongo extension on mac server and it worked for my bitnami lamp stack.
The instructions were on this blog:
http://andres.jaimes.net/857/setup-php-mongo-on-mac/