Error: Cannot find a valid baseurl for repo: centos-sclo-rh - centos

When try to use yum update on Centos6 I get this error: "Error: Cannot find a valid baseurl for repo: centos-sclo-rh."
Is there any way to get out of this error condition?
[root#4206-yv3 ~]$ yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=6&repo=sclo-rh error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: centos-sclo-rh
[root#4206-yv3 ~]$

You can try this one.
echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
echo "http://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
echo "http://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt
echo "http://vault.centos.org/6.10/sclo/x86_64/rh" > /var/cache/yum/x86_64/6/centos-sclo-rh/mirrorlist.txt
echo "http://vault.centos.org/6.10/sclo/x86_64/sclo" > /var/cache/yum/x86_64/6/centos-sclo-sclo/mirrorlist.txt

because centos6 is EOL, for centos-sclo-rh , add below to CentOS-Base.repo
[centos-sclo-rh]
name=CentOS-6.10 - SCLo rh
baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
[centos-sclo-sclo]
name=CentOS-6.10 - SCLo sclo
baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

Since we're talking about CentOS6 which reached its EOL, this is something expected. If you don't want to worry about using yum clean all, navigate to /etc/yum.repos.d/ and adjust entries in CentOS-Base.repo.
You'll need to comment-out all lines starting with "mirrorlist=" and uncomment the ones starting with "baseurl=".
The next thing is editing urls on "baseurl" lines - switch all "mirror.centos.org" entries with "vault.centos.org". For example, the first block should look something like this after you've edited it:
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

I did not need SCL, so I removed /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo and this resolved the issue.

You can try:
yum-config-manager --disable centos-sclo-sclo/x86_64
or
yum-config-manager --disable centos-sclo-rh/x86_64

Related

Error installing Kinetics Ros on ubuntu 16.04

I'm trying to install kinetics ros on ubuntu 16.04, followig the guide http://wiki.ros.org/kinetic/Installation/Ubuntu
The problem starts when I code this in terminal:
sudo apt-get update
The resume of the result is this:
W: The repository «http://packages.ros.org/ros/ubuntu $ (lsb_release Release» does not have a Publication file.
N: Data from a repository like this cannot be authenticated and therefore its use is potentially dangerous.
N: See the apt-secure (8) manual page for details on creating repositories and configuring users.
E: Failed to get http://packages.ros.org/ros/ubuntu/dists/$(lsb_release/-sc)/binary-amd64/Packages 404 Not Found [IP: 140.211.166.134 80]
E: Some index files could not be downloaded, omitted, or old ones used instead.
I'm new in this, so I suposed that the problem was kind of resolved using the 'old ones instead'.
So I've continued with the guide and I code this in terminal:
sudo apt-get install ros-kinetic-desktop-full
And the resume of the result is the following:
Errors were encountered while processing:
  ros-kinetic-eigen-stl-containers
  ros-kinetic-geometric-shapes
  ros-kinetic-collada-urdf
  ros-kinetic-robot-model
  ros-kinetic-robot
  ros-kinetic-desktop
  ros-kinetic-simulators
  ros-kinetic-desktop-full
E: Sub-process / usr / bin / dpkg returned an error code (1)
I dont know if this two problem are related, but I dont know how to start to fix its.
I apreciate your help.
Thanks for your time.
I think something went wrong when you did Step 1.2 of the instructions. These two lines look very wrong:
«http://packages.ros.org/ros/ubuntu $ (lsb_release Release»
http://packages.ros.org/ros/ubuntu/dists/$(lsb_release/-sc)/binary-amd64/Packages
lsb_release is a command that was meant to be executed in that step, and the result should have been added to the apt source. Instead, it seems, it was just added as a string.
Please execute once more:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
and make sure that no space is introduced anywhere when you do that. To check that it worked, verify that you get:
> cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu xenial main
If you do, then run sudo apt-get update once more. After that
sudo apt-get install ros-kinetic-desktop-full
should succeed.

Viewing the cpanm error log in Bitbucket pipelines when installing a Perl module fails

I have a BitBucket Pipeline that installs a bunch of Perl modules using cpanm. One of them fails and this is the snippet I can see in the log:
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/ack-v3.0.2.tar.gz ... OK
Configuring ack-v3.0.2 ... OK
==> Found dependencies: File::Next
--> Working on File::Next
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz ... OK
Configuring File-Next-1.16 ... OK
Building and testing File-Next-1.16 ... OK
Successfully installed File-Next-1.16
! Installing App::Ack failed. See /root/.cpanm/work/1562605191.55/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'App::Ack' is not installed
! Bailing out the installation for ..
Building and testing ack-v3.0.2 ... FAIL
How could I access the build.log that was created by the installation process?
Apparently recently Bitbucket added a feature called "after-script" so I could add the following and that would print the content of the log files.
after-script:
- ls -1 /root/.cpanm/work/*/build.log | xargs cat
or maybe even this:
after-script:
- cat /root/.cpanm/work/*/build.log
and the following, I think, will only show the content of the log files if the build failed:
after-script:
- $BITBUCKET_EXIT_CODE && cat /root/.cpanm/work/*/build.log
Read more here: https://bitbucket.org/blog/after-scripts-now-available-for-bitbucket-pipelines

Unable to start bitbake server

I am trying to learn yocto by following the video tutorials on their main website. I installed the poky-rocko-18.0.0 and after setting up the build environment I tried to build the linux image using the following command:
bitbake core-image-minimal
However, I am getting the following error:
I am unsure how to start the bitbake server and so far have not found any good references for the same.
We also faced same issue with our bitbake server. It will worked after remove bitbacke.lock
file. Use below command for solution.
rm -rf bitbake.lock
###/build$ bitbake core-image-sato
Loading cache: 100% |#########################################################################################################################################################################################################| Time: 0:00:01
Loaded 3867 entries from dependency cache.
Parsing recipes: 100%
My problem was some missing packages on my build system.
Fixed it by installing the following packages (Debian):
sudo apt-get install chrpath
sudo apt-get install texinfo
On my Arch system:
sudo pacman -S rpcsvc-proto chrpath texinfo cpio diffstat
Just try this in your build folder:
rm -rf bitbake.lock
this shoud work
The reason for this is the state of the bitbake is locked during last bitbake execution. Once you stop intermittently, we need to remove the bitbake.lock
In my case it was solved with this answer from https://stackoverflow.com/a/45880855/5350353 (Unable to connect to bitbake server):
This is because new function findTopdir (Submitted on July 18, 2017) does not handle errors. For example, the lack of BBPATH environment variable and the inability to find conf/bblayers.conf in BBPATH. findTopdir just returns None in case of that errors.
Maybe caused by the absence of host application(s), like gawk, chrpath and texinfo.
Below is one example.
ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/home/zephyr/workspace/w031/openembedded-core/build/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 22675 at 2019-03-16 00:28:44.447008 ---
Traceback (most recent call last):
File "/home/zephyr/workspace/w031/bitbake/lib/bb/cookerdata.py", line 290, in parseBaseConfiguration
bb.event.fire(bb.event.ConfigParsed(), self.data)
File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 225, in fire
fire_class_handlers(event, d)
File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 134, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/zephyr/workspace/w031/bitbake/lib/bb/event.py", line 106, in execute_handler
ret = handler(event)
File "/home/zephyr/workspace/w031/openembedded-core/meta/classes/base.bbclass", line 238, in base_eventhandler
setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
File "/home/zephyr/workspace/w031/openembedded-core/meta/classes/base.bbclass", line 142, in setup_hosttools_dir
bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))
File "/home/zephyr/workspace/w031/bitbake/lib/bb/__init__.py", line 120, in fatal
raise BBHandledException()
bb.BBHandledException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zephyr/workspace/w031/bitbake/lib/bb/daemonize.py", line 83, in createDaemon
function()
File "/home/zephyr/workspace/w031/bitbake/lib/bb/server/process.py", line 469, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/home/zephyr/workspace/w031/bitbake/lib/bb/cooker.py", line 210, in __init__
self.initConfigurationData()
File "/home/zephyr/workspace/w031/bitbake/lib/bb/cooker.py", line 375, in initConfigurationData
self.databuilder.parseBaseConfiguration()
File "/home/zephyr/workspace/w031/bitbake/lib/bb/cookerdata.py", line 317, in parseBaseConfiguration
raise bb.BBHandledException
bb.BBHandledException
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
gawk
First, change local.conf, bblayers.conf to previous configuration.
Then, bitbake -c cleanall recipe_name.
It will be all right now!
Like the OP stated a package was missing on the build host. ( makeinfo in his case)
To properly prepare the build host, look into the documentation for your yocto version and your Distro.
latest
In my case some playing with devtool caused a duplicated definition in bblayers.conf:
BBLAYERS ?= " \
${TOPDIR}/../meta \
${TOPDIR}/../meta-poky \
${TOPDIR}/../meta-yocto-bsp \
${TOPDIR}/../meta-atmel \
${TOPDIR}/../meta-libgpiod \
${TOPDIR}/../meta-libuio \
${TOPDIR}/../meta-lsuio \
${TOPDIR}/workspace \
/home/me/yocto/poky/build/workspace \
"
I had to manually remove one of the two last lines as follows:
BBLAYERS ?= " \
${TOPDIR}/../meta \
${TOPDIR}/../meta-poky \
${TOPDIR}/../meta-yocto-bsp \
${TOPDIR}/../meta-atmel \
${TOPDIR}/../meta-libgpiod \
${TOPDIR}/../meta-libuio \
${TOPDIR}/../meta-lsuio \
${TOPDIR}/workspace
"
Then I retried and the issue was resolved.
In my case (PLNX 2018.2) I was not getting this problem because of the .Xil folder that was hidden in the root directory of the project, deleting it solves the problem.
I had a similar issue; with an additional Unicode Decode Error: 'ascii' codec can't decode byte 0xe2 in position 5305: ordinal not in range(128) at the bottom of the list.
I resolved this by checking my 'locale' setting in Ubuntu 18.04. and running the following:
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
bitbake-layers command worked perfectly after this.
Please shutdown and rerun that bitbake command then it will solve.

PHP Fatal error: Class 'Phar' not found in

When I deploy my commits via Git to the server, it runs a git hook that has the line
test -f composer.phar && ./composer.phar self-update || curl -s http://getcomposer.org/installer | php;
That generates the error:
PHP Fatal error: Class 'Phar' not found in .../composer.phar on line 23
This is line 23 from composer.phar:
Phar::mapPhar('composer.phar');
I did search other questions with the same problem and checked these things:
git hook's script already has permission to be executed
I can execute ./composer.phar without error when logged in server and inside the same folder as set in the git hook's script
PHP modules has Phar enabled, checked via php -m
There is no extension=phar.so in php.ini, but I dont think it has to be because it's already enabled
PHP version: PHP 5.5.3 (cli)
What else could be causing this?

How to set node path for nodejs (Ubuntu)

I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.