Copying Centos 6.4 DVD 1 to a folder and using it as a repo works, but DVD 2 returns errors - repository

i downloaded centos 6.4 dvd's 1 and 2
1st one was 4.4 gb
2nd one was 1.4 gb
obviously second one has repo files in it as well.
so mounted them then copied them to 2 folder.
home/a/repo_dvd_1
home/a/repo_dvd_2
and then i added them to the repos
i simply edited the CentOS_Base.repo or whatever that file is called.
i added "enabled=0" to everything and put these on top
[01]
name=01
baseurl=file:///home/a/repo_dvd_1
enabled=1
gpgcheck=0
[02]
name=01
baseurl=file:///home/a/repo_dvd_2
enabled=1
gpgcheck=0
and then i ran
yum clean all
and then i tried searching for php
yum search php
here is the result.
[root#localhost a]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: 01 02
Cleaning up Everything
Cleaning up list of fastest mirrors
[root#localhost a]#
[root#localhost a]# yum search php
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
01 | 4.0 kB 00:00 ...
01/primary_db | 4.4 MB 00:00 ...
file:///home/a/repo_dvd_2/repodata/repomd.xml: [Errno 14] Could not open/read file:///home/a/repo_dvd_2/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: 02. Please verify its path and try again

I know this is an old thread but I just got here looking for a solution of exactly the same thing.
After a while I figured it out by myself: All you need if you want to make a repo from DVD1 and DVD2 (without getting your hands dirty with 'createrepo') is to copy DVD2 rpms (from its 'Packages' subdirectory) into the same directory where you copied the DVD1 rpms ('Packages' if you respected the tree, as you should). This is it:
Mount the DVD2 iso in a directory:
mount -o loop CentOS-6.4-x86_64-bin-DVD2.iso somedir
Copy all rpms from the 'Packages' subdirectory to the directory where you copied the DVD1 packages in the first place ('home/a/repo_dvd_1/Packages' as per the original poster's post):
cp somedir/Packages/*.rpm home/a/repo_dvd_1/Packages
Get rid of the DVD2 part in your .repo file ([02] in the original post), leave only the [01] for DVD1, since the list of rpms in DVD1 actually contains those of DVD2.
Now the DVD2 rpm's will be pulled from DVD1 repo.
Have fun!

I did it another way.
You can mount both images for example
mkdir myrepo myrepo/dvd1 myrepo/dvd2;
cd myrepo
mount -o loop CentOS-6.4-x86_64-bin-DVD1.iso dvd1
mount -o loop CentOS-6.4-x86_64-bin-DVD2.iso dvd2
and create your own repo config with createrepo script, but if you call it directly, you will lose groups configuration, on first dvd look at file repomd.xml, there is data type group section, with strange xml file name, which contains group mappings, so you can then call:
createrepo -g dvd1/repodata/2727fcb43fbe4c1a3588992af8c19e4d97167aee2f6088959221fc285cab6f72-c6-x86_64-comps.xml .
of course check this hash name for proper one for your version. This will rescan the iso content and create repodata in myrepo directory, so point yum to it
this is probable not the tidiest solution, but it was the fastest way for me.

Related

Can't install nautilus-dropbox on Centos 8

I try to install dropbox on Centos8, however Terminal gives strange errors. Tried different commands, same error.
Firstly downloaded *.rpm file from dropbox website, currently trying to install it.
Commands I tried:
rpm -ivh nautilus-dropbox-2020.03.04-1.fedora.x86_64.rpm
yum localinstall nautilus-dropbox-2020.03.04-1.fedora.x86_64.rpm
Error:
Last metadata expiration check: 0:18:27 ago on Thu 12 Mar 2020 03:46:17 PM EET
Error:
Problem: conflicting requests
nothing provides libgnome >= %{gnome_version} needed by nautilus-dropbox-2020.03.04-1.fc21.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root#localhost Downloads]
Also tried --skip-broken and --nobest - but no luck.
Also tried sudo yum install libgnome but it gives error:
Last metadata expiration check: 9:51:39 ago on Thu 12 Mar 2020 02:42:06 PM UTC.
No match for argument: libgnome
Error: Unable to find a match: libgnome
I have:
[adminuser#localhost ~]$ cat /etc/centos-release
CentOS Linux release 8.1.1911 (Core)
Tried to google this mistake, but no luck. Could you please give me any hint how I could overcome this?
Thank you
This is a bug in packaging. Contact Dropbox support and report it as a bug.
Technical details (just in case you are Dropbox employee):
During building rpm, when you use macro then it is expanded. Try yoursel:
$ rpm --eval '%{_bindir}'
/usr/bin
However, when the macro is not defined, you get original value:
$ rpm --eval '%{some_bullshit}'
%{some_bullshit}
So the macro gnome_version should likely contain some version, but this macro was not defined.
nothing provides libgnome
"libgnome" is about libgnome-2 → https://linux.dropbox.com/fedora/ → I.e. Fedora only packages. CentOS 8 has no libgnome* available.
https://www.dropbox.com/install-linux → Compile from source → CentOS 8
# dnf install nautilus-devel-3.28.1-10.el8.x86_64 python3-docutils
tar xvf nautilus-dropbox-2020.03.04.tar.bz2
cd nautilus-dropbox-2020.03.04/
./configure && make
# make install
Result : nautilus-dropbox-2020.03.04-1.el8.x86_64.rpm https://drive.google.com/file/d/1AcxlVdbWOzQvcoVOFYCiaVny9MzgC-Ea/view?usp=sharing
# rpm -Uvh nautilus-dropbox-2020.03.04-1.el8.x86_64.rpm : No issues.
First, realize that the command showing at the install page is for the headless installation. It will probably work, but my preference is to use Dropbox with nautilus integration.
This instructions assumes a installation of Dropbox with Nautilus integration.
We need to compile the installer from source.
a. Download last package
wget https://linux.dropbox.com/packages/nautilus-dropbox-2020.03.04.tar.bz2
b. Extract tarball
tar xjf ./nautilus-dropbox-2020.03.04.tar.bz2
c. Try to compile
cd nautilus-dropbox-2020.03.04; ./configure;
Then you get an Error:
Erro:
Problema: conflicting requests
- nothing provides libgnome >= %{gnome_version} needed by nautilus-dropbox-2020.03.04-1.fc21.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Now we need to install nautilus-devel and python3-docutils
NOTE: You will get configure: error: couldn't find docutils if forget python3-docutils.
This command will enable the PowerTools repository and install what is needed:
dnf --enablerepo=PowerTools install nautilus-devel python3-docutils
Now you can run ./configure && sudo make install
That's it. Go for the start menu type "Dropbox", it will start the installer.
Restore a local backup of Dropbox (optional)
If you have a local backup, turn of the network after you see the Dropbox folder created. Then copy all your files to that folder and turn it on after copy.
This solution worked for me running CentOS Linux release 8.2.2004 (Core).

Q: E: Error reading the CPU table in ubuntu

I can not update or upgrade my computer by terminal.
Show the error message E: Error reading the CPU table.
how can I fix it ?
In my case some file system corruption caused files in the directory /usr/share/dpkg/ and the file /usr/share/dpkg/cputable wasn't found
to be deleted, concurrent access during some other operation?
rsync / copying ( in my case rsync'ing ) from a known good installation appears to have fixed this particular problem
possible alternative boot from a livecd and mount the target disk and copy
The command strace apt update showed the location of the missing file
In My case I have faced with corrupted dpkg installation and at the end it ended up with “E: Error reading the CPU table” even I enter sudo apt-get update
Step to fix it.
1) Create tempory location for dpkg and download relavent .deb file
sudo mkdir /tmp/dpkg then
cd tmp/dpkg
2) Downlod .deb file with relavent .deb file in http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/
sudo wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.19.0.5ubuntu5.1_amd64.deb
3) Manually go to that downloaded directory and extract the .deb file(GDebi installation might not work as well)
Navigate to <Your_Extracted_Folder>/usr/share/dpkg and now you can
see the set of files with cputable file. We need to copy these files
to /usr/share/dpkg
4) Check /usr/share/ having dpkg folder if not create it with
sudo mkdir /usr/share/dpkg
5) cd <Your_Extracted_Folder>/usr/share/dpkg
6) sudo cp * /usr/share/dpkg
Now you can see all the files and it will fix the “E: Error reading the CPU table”
Check if you have (unintentionally) "overwritten" your /usr/share directory with a file..
ls -l /usr/
-rwxr-xr-x 1 root root 1254 Feb 4 19:08 share*
drwxr-xr-x 193 root root 4096 Dec 10 09:09 share~/
I solved it by moving the file share* to share_bak and then renaming the directory share~ (to share). Problem solved!

I m trying to integrate ldap with devstack and when i did ./stack.sh i got this localrc: line 9: KEYSTONE_IDENTITY_BACKEND: command not found

localrc file
ADMIN_PASSWORD=password2 MYSQL_PASSWORD=password2
RABBIT_PASSWORD=password2 SERVICE_PASSWORD=password2
SERVICE_TOKEN=token2
ENABLED_SERVICES=key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit,ldap
KEYSTONE_IDENTITY_BACKEND=ldap
KEYSTONE_CLEAR_LDAP=yes LDAP_PASSWORD=9632
I followed this website(http://www.ibm.com/developerworks/cloud/library/cl-ldap-keystone/)
I am assuming the above snippet is from a file written in shell script. Your example looks Ok.
I checked the link you provided and noted that the line you say failed is written in the IBM example as:
KEYSTONE_IDENTITY_BACKEND = ldap
Which is not legal sh (or bash) and would cause the error message you described.
KEYSTONE_IDENTITY_BACKEND = ldap
-bash: KEYSTONE_IDENTITY_BACKEND: command not found
I suspect you copied and pasted the bad example from the link into your localrc file, which caused the error you saw, but somehow when you wrote the SO question, you corrected the mistake by removing the spaces around the "=".
Edit: Investigation
;TLDR
Create a file in the root of the devstack repo, devstack/local.conf with the contents:
[[local|localrc]]
ADMIN_PASSWORD=password2
MYSQL_PASSWORD=password2
RABBIT_PASSWORD=password2
SERVICE_PASSWORD=password2
SERVICE_TOKEN=token2
ENABLED_SERVICES=key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit,ldap
KEYSTONE_IDENTITY_BACKEND=ldap
KEYSTONE_CLEAR_LDAP=yes
LDAP_PASSWORD=9632
Full Description
I installed devstack on Centos7 (using the Devstack Quick Start Guide):
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
./stack.sh
I entered passwords as prompted, but eventually it failed with the error:
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
I traced the problem to a limited PATH in the sudoers entry, and because my postgreSQL install is in a non-standard location, I linked pg_config into /usr/local/bin and ran stack.sh again:
sudo ln -s /usr/pgsql-9.3/bin/pg_config /usr/local/bin/pg_config
./stack.sh
(You probably won't have to do this if Postgres is in a standard location).
Install took a long time -
This is your host IP address: 192.168.200.181
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.200.181/dashboard
Keystone is serving at http://192.168.200.181/identity/
The default users are: admin and demo
The password: 12345678
2016-07-17 18:16:32.834 | WARNING:
2016-07-17 18:16:32.834 | Using lib/neutron-legacy is deprecated, and it will be removed in the future
2016-07-17 18:16:32.834 | stack.sh completed in 1447 seconds.
I killed the devstack session and did it all again with a clean git repo and with a localrc file.
./unstack.sh
cd ..
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
cat << __EOF > local.conf
[[local|localrc]]
ADMIN_PASSWORD=password2
MYSQL_PASSWORD=password2
RABBIT_PASSWORD=password2
SERVICE_PASSWORD=password2
SERVICE_TOKEN=token2
ENABLED_SERVICES=key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit,ldap
KEYSTONE_IDENTITY_BACKEND=ldap
KEYSTONE_CLEAR_LDAP=yes
LDAP_PASSWORD=9632
__EOF
./stack.sh
This time there were no password prompts, so the local config was definitely read.

Trying to install MariaDB on Dokku

I'm on my Server via ssh and trying to install MariaDB plugin for Dokku:
root#CHF:/var/lib/dokku/plugins# sudo git clone https://github.com/krisrang/dokku-mariadb mariadb
Cloning into 'mariadb'...
remote: Counting objects: 68, done.
remote: Total 68 (delta 0), reused 0 (delta 0), pack-reused 68
Unpacking objects: 100% (68/68), done.
Checking connectivity... done.
root#CHF:/var/lib/dokku/plugins# sudo dokku plugins-install
2016/03/24 15:10:42 open /var/lib/dokku/plugins/available/mariadb/plugin.toml: no such file or directory
2016/03/24 15:10:42 open /var/lib/dokku/plugins/available/md-plugin/plugin.toml: no such file or directory
root#CHF:/var/lib/dokku/plugins#
What am I doing wrong here?
Its not installed, I can't create a database and tables..
I tried also this way:
sudo dokku plugin:install https://github.com/Kloadut/dokku-md-plugin
--name mariadb
Check the output of ls -lha /var/lib/dokku/plugins/enabled
There are two directories inside /var/lib/dokku/plugins/ : available and enabled.
"available" contains every plugin that was installed and not yet uninstalled;
"enabled" contains all plugins that are being used. Each plugin that is being used is actually just a "shortcut" pointing to a another directory.
Taken from here
If you see a plugin you deleted outside of dokku, remove it with rm -r /var/lib/dokku/plugins/available/pluginNameHere
Those two plugins are not compatible with the latest version of dokku.

Security plugin in Local yum repository

I've created a local yum repository for RHEL 7 on a separate server. Then I used the "reposync" command to get the packages from RHN.
reposync --download-metadata --gpgcheck -l --repoid=rhui-REGION-rhel-server-rh-common --download_path=/rhel_security_repo/
reposync --download-metadata --gpgcheck -l --repoid=rhui-REGION-rhel-server-optional --download_path=/rhel_security_repo/
reposync --download-metadata --gpgcheck -l --repoid=rhui-REGION-rhel-server-releases --download_path=/rhel_security_repo/
After that, I executed the following command to create my repo:
createrepo --database /rhel_security_repo/
The repository was created successfully with over than 9000 packages as expected. What I am trying to do now is to have other boxes using this local repository. I've created a yum config file in the other boxes where the baseurl points to this server with the local yum repository.
[security-updates-rhel7]
name=Repository for RHEL7 security updates
baseurl=ip-server
enabled=1
gpgcheck=1
All the servers are able to talk to this server with the local yum repo and they can install packages from it.
The problem is I can't update packages when I run yum update --security:
Example:
yum --disablerepo="*" --enablerepo="security-updates-rhel7" --security update mariadb-libs
Loaded plugins: amazon-id, rhui-lb
--> 1:mariadb-libs-5.5.37-1.el7_0.x86_64 from #rhui-REGION-rhel-server-releases removed (updateinfo)
--> 1:mariadb-libs-5.5.40-2.el7_0.x86_64 from security-updates-rhel7 removed (updateinfo)
No packages needed for security; 1 packages available
Resolving Dependencies
However, if I run the command without --security, I can see available updates:
yum --disablerepo="*" --enablerepo="security-updates-rhel7" update mariadb-libs
Loaded plugins: amazon-id, rhui-lb
Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.37-1.el7_0 will be updated
---> Package mariadb-libs.x86_64 1:5.5.40-2.el7_0 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Updating:
mariadb-libs x86_64 1:5.5.40-2.el7_0 security-updates-rhel7 753 k
Transaction Summary
==============================================================================================================================
Upgrade 1 Package
Total download size: 753 k
Is this ok [y/d/N]:
It seems I lost the security metadata when I did the reposync.
Any ideas what the problem could be?
Etan has the right idea; those are the two ways we found to get around the issue with RHEL6. You could pull the Redhat metadata straight out of your yum cache and copy it into your local repo, and that works 90% of the time... but 10% it will give you random failures if Redhat happens to be updating a repository while you are syncing it.
Redhat has a guide for how to graft security metadata into your local repo in RHEL5/6, I assume it works similarly in RHEL7. If you have a Redhat Support account, see: https://access.redhat.com/solutions/55654
If you don't, below is my own take on it:
Run your reposync command with --download-metadata and other trimmings, but I would start with one repo at a time and put each one in it's own directory similar to how Redhat does it. ex. mkdir -p /path/to/repo-id && reposync -l -n --download-metadata -r repo-id -p /path/to/repo-id/.
Pull the abcdefghij-updateinfo.xml.gz metadata files from Redhat, which contains security metadata for each repository. Do this by running yum list-sec and then look for it in your local yum cache, under each repository's subdirectory. Probably somewhere in /var/cache/yum/arch/7Server/repo-id.
Run createrepo on just that repository. createrepo -v /path/to/repo-id/
Go into /path/to/repo-id/ and then into the repodata subfolder. Copy in the abcdefghij-updateinfo.xml.gz from your local yum cache into the repodata folder, but rename it to remove the hash at the beginning. Left with a file called updateinfo.xml.gz
Use the modifyrepo command to insert the security metadata into that repo's table of contents (repomd.xml) file.
modifyrepo /path/to/repo-id/updateinfo.xml.gz /path/to/repo-id/