Creating rhel iso with custom rpm - centos

I have added my package under Packages folder in iso . Then i have updated repodata. Later i have created a group my-packages and added it in %package section in kickstart file at the end . But when i install the iso, and see the /root/install.log,mine packages are not install at the end . Thus it causing use of system os command in error .
How to add our own rpm's after installtion of base os rpm's,so that i can access all system os command in my rpm .
And again how to specify the installation order of rpm .

Try to set up a http mirror (local or remote), and put your rpm under "Packages".
Add your mirror as a repo on your kickstart (repo directive)
Then append your package name in the "%packages" session:
Example:
Pcakage file: mypackage.rpm
Mirror: MyMirror.com or (Ip address pointing to your local http server on the same network as the machine being installed)
The repo directive:
repo --name="MyRepo" --baseurl=http://MyMirror.com
Packages section:
%packages
#base
mypackage # without .rpm nor version
%end
Macke sure that "http://MyMirror.com/Packages/mypcakage.rpm" is downloadable.
Real example:
--repo --name="CentOS" --baseurl=http://mirror.centos.org/centos/6/os/x86_64 --cost=100
%packages
#base
nano
%end
While the package url is "http://mirror.centos.org/centos/6/os/x86_64/Packages/nano-2.0.9-7.el6.x86_64.rpm"
Another Alternative, install your rpm at the Post Install section:
If the OS being installed doesn't have "wget" add it to "%packages":
%post
wget http://MyMirror.com/Packages/mypcakage.rpm
rpm -i mypcakage.rpm
I hope this could help.

Related

Installing Vivado ML 2021.2 in CentOs but process is hang in 'Generating installed device list'

anybody can help me figure out why the installation is hanging on 'Generating installed device list' and how to solve it without starting the process all over. I am working on CentOs.
Thanks in advance
I think this happens due to following missing packages:
libstdc++6:i386
libgtk2.0-0:i386
dpkg-dev:i386
ncurses5-compat-libs
python3-pip
libtinfo5
libncurses5
As BKN mentioned, you need to install the missing packages.
To avoid starting all over again, you can do the following:
Check the log: cat ~/.Xilinx/xinstall/*.log
Locate the error message. It should look something like:
2022-01-09 10:53:11,458 DEBUG: n.t:? - Executing script Generating installed device list: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl, -tclargs, /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt]
2022-01-09 12:05:35,319 DEBUG: n.t:? - Unable to run GenerateDevListFileLin, exit code: 130, stdout: , stderr: application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory failure msg:
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory
2022-01-09 12:05:35,319 DEBUG: n.t:? - Executing script Generating installed device list for Model Composer: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Model_Composer/2021.2/data/xmcGenBoardParts.tcl, -tclargs, /tools/Xilinx/Model_Composer/2021.2/../../Vivado/2021.2, librdi_dsp_tcltasks.so, /tools/Xilinx/Model_Composer/2021.2/data]
The log informs you exactly what the missing package is (in this case it was libtinfo), and also provides you with the script to run after you install the package:
/tools/Xilinx/Vivado/2021.2/bin/vivado -nolog -nojournal -mode batch -source /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl -tclargs /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt
Notes:
Make sure to use the Vivado version (here it was 2021.2) and location (here it was /tools/Xilinx) according to your system.
You may need to run the script in sudo if the the permissions for writing are not available in user mode.
I also encounterd this problem on Archlinux with Vivado 2018.3.
But I just installed the library ncurses5-compat-libs, then the problem is solved.
Perhaps you can solve this by checking the library ncurses5-compat-libs.
Download the tar package instead of the self-extracting bin package
Update the java and python version
sudo apt-get install -y python3-pip
Install Dependencies
sudo apt-get install -y libstdc++6
sudo apt-get install -y libgtk2.0-0
sudo apt-get install -y dpkg-dev
NOTE: Without ibtinfo5 the application will not start and without libncurses5 the simulation will fail
`sudo apt-get install -y libtinfo5 libncurses5`
Restart the system
Untar that Vivado package
tar -xzvf Xilinx_Unified_2021.2_1021_0703.tar.gz
Locate the xsetup file in the package
Install the package in batch mode
./xsetup --agree 3rdPartyEULA,XilinxEULA --batch Install --product "Vivado" --edition "Vivado ML Enterprise" --location "/home/USER"
Once the installation has been successfully completed
Locate the settings64.sh file
./settings64.sh
Locate the cable drivers
cd Vivado/2021.2/data/xicom/cable_drivers/lin64/install_scripts/install_drivers
./install_drivers
Installing Vivado Board Files
Get the board package from the git https://github.com/Digilent/vivado-boards.git
From the vivado-board-master package copy the folder board_files undert /vivado-board-master/new/board_files
Paste the board files to Vivado/2021.2/data/boards
From the vivado-board-master package copy the file Vivado_init.tcl under /vivado-board-master/utility
Paste the file Vivado_init.tcl to the Vivado installation
That's it!! You might not need to do all these steps but that is what I ended up doing and it worked for the two machines where I installed Vivado. The installation took less than one hour.
This was originally edited into the question itself by the OP.

idn2.h: No such file or directory

I am on 64-bit Centos 6.6 and want to install libidn2-devel. I tried yum install libidn2-devel and that didn't work. I tried downloading rpms from various websites from Internet(resolving recursive dependencies manually!)
(Not so) Soon I stuck at the one of the dependencies
libidn2.so.0()(64bit) is needed by libidn2-devel-0.10-1.sdl7.x86_64
which I could not find anywhere on the Internet (for CentOS).
Eventually, I downloaded the source and tried to build it.
wget -c ftp://alpha.gnu.org/gnu/libidn/libidn2-0.10.tar.gz
tar -xvzf libidn2-0.10.tar.gz
./configure
make
Success!
However, when I used it to run a module, it gives me
error: idn2.h: No such file or directory
<idn2_variable> was not declared in this scope
PS : RPM seems weird
$ rpm -q libidn2-devel
package libidn2-devel is not installed
$ rpm -q libidn2
libidn2-2.0.4-1.el6.x86_64
libidn2-devel is provided via the EPEL Repo
Name : libidn2-devel
Arch : x86_64
Version : 2.0.4
Release : 1.el6
Size : 54 k
Repo : epel
Summary : Development files for libidn2
URL : https://www.gnu.org/software/libidn/#libidn2
License : (GPLv2+ or LGPLv3+) and GPLv3+
Description : The libidn2-devel package contains libraries and header files for
: developing applications that use libidn2.
The wiki page here will give you some more details, and if you want to install EPEL for use with yum then you should download (and install) this rpm to your system then check in /etc/yum.repos.d/epel.repo for the config file it will leave. Inside there you need to check the [EPEL] section has the line enabled=1 (I think its disabled by default)
You may want/need to clean up the stuff you have tried to manually install though so you avoid any problems with updates etc.

imagemagick install problems in centos

i'm trying to install imagemagick on my server (centos 7.1 minimal) by this url:
imagemagick installation steps
get this error in step 1:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* epel: mirrors.n-ix.net
* extras: mirror.de.leaseweb.net
* remi: remi.schlundtech.de
* remi-php55: remi.schlundtech.de
* remi-php56: remi.schlundtech.de
* remi-safe: remi.schlundtech.de
* remi-test: remi.schlundtech.de
* updates: mirror.de.leaseweb.net
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
No package php-devel available.
No package php-pear available.
Nothing to do
Because this item has been questioned on many sites, I fully explain the installation process...
this proccess tested on centos 6.5 and php56 and imagick-3.4.3(ImageMagick-7)
Change the installation process for any part that needs to be changed like as your php version or folder.
you can find lasted version of "ImageMagick" in ImageMagick versions
; use lasted stable version.
If you have already installed "ImageMagick" several times, first remove all of them and find "ImageMagick" & "imagick" folders & files and clean all of them and continue the installation process with this process.
# yum remove ImageMagick ImageMagick-devel
Use the following command to find a file or folder:
# find / -name 'ImageMagick*'
# find / -name 'imagick*
Find and delete all the files and folders that are displayed
Start Installation php-pear:
Ensure you have php-pear installed, which will be used later to install Imagick PHP module.
If you don’t have pear, you can install using Yum:
# yum install php-pear
If you see the following error:
No package php—pear available.
Error: Nothing to do
solation:
# cd /etc/
and open yum.conf
OR
# nano /etc/yum.conf
And then find and remove php* and save file
then type:
# yum install --enablerepo remi php-pear php-devel
for test success Installation:
type:
# yum info php-pear
result is something like this :
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: yum.ds.stackexchange.com
stack-local-prod | 2.9 kB 00:00
Available Packages
Name : php-pear
Arch : noarch
Epoch : 1
Version : 1.9.4
Release : 4.el6
Size : 393 k
Repo : base
Summary : PHP Extension and Application Repository framework
URL : http://pear.php.net/package/PEAR
License : BSD and PHP and LGPLv2+
Description : PEAR is a framework and distribution system for reusable PHP
: components. This package contains the basic PEAR components.
Start Installation ImageMagick:
# yum install ImageMagick
# yum install ImageMagick-devel
# pecl install Imagick
Important: copy "ImageMagick" folder from "/usr/include" to "/usr/local/include" for ImageMagick find "MagickWand.h"
# cd /usr/include
# cp ImageMagick /usr/local/include
before below lines don't forget: go to "php.ini" find "disable_functions" and clean "proc_open,popen,proc_close" becuase make imagick needs these functions, after complete installation you can add this functions to your "disable_functions" on "php.ini" file.
continue:
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-3.4.3.tgz
# tar xzfv imagick-3.4.3.tgz
# cd imagick-3.4.3
# phpize
# ./configure --with-php-config=/usr/local/php56/bin/php-config
# make
# make install
copy Installing shared extensions: "/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/" this is extension dir
Copy "imagick.so" from "/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/" to "/usr/local/php56/lib/php/extensions/" extension directory.
# cd /usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/
# cp imagick.so /usr/local/php56/lib/php/extensions/
Then, edit "php.ini", find "Dynamic Extensions" add extension=imagick.so in a empty line, don't forget there are 2 or more "php.ini" on your server, you can find all of them:
# find / -name 'php.ini'
result may be like this
/etc/php.ini
/usr/local/php56/lib/php.ini
Use this file at all stages:
/usr/local/php56/lib/php.ini
for test success Installation:
# php -m | grep imagick
result should be: imagick
for find all php functions and extensions use :
# php -m
now you can find "imagick" at showed list
Don't forget:
edit "php.ini", find "disable_functions" and add "proc_open,popen,proc_close" to disable_functions For server security!
now reboot your server
# reboot
for test imagick installation on php, use this code at php file:
if(extension_loaded('imagick')) {
$imagick = new Imagick();
print_r($imagick->queryFormats());
}
else {
echo 'imagick is not available.';
}
OR use
echo phpinfo();
According to the repository list in your paste, you are using "remi" repository for PHP. So, just
yum install php-pecl-imagick
No need to build from sources, when a RPM package exists.
But as yum doesn't even found php-devel, check yum configuration for "exclude" line, looks like a cpanel host which replace lot of base packages by their own.

package is installed via pip in wrong (src) directory instead of site packages

I'm installing this package into a virtualenv using virtualenvwrapper and pip with this command:
pip install -e git+git://github.com/mr-stateradio/django-exchange.git#egg=django_exchange-master
Interestingly the package is then placed into a src folder, and not into the site-packages folder which I would have expected. The package is placed into this folder:
<path-to-my-virtual-env>/testenv/src/django-exchange-master/exchange
Instead of this:
<path-to-my-virtual-env>/testenv/lib/python2.7/site-packages
I assume something is wrong with the pip install command I'm using or with the setup.py of the package.
The -e option tells pip to install packages in “editable” mode. If you remove the -e option, pip will install the package into <venv path>/lib/Python_version/site-packages. Don't forget to remove the packages inside <venv path>/src, because python looks for the packages inside <venv path>/src first.
pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects the type of VCS using url prefixes: “git+”, “hg+”, “bzr+”, “svn+”.
e.g
$ pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
$ pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
$ pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
$ pip install -e git+https://git.repo/some_pkg.git#feature#egg=SomePackage # from 'feature' branch
VCS projects can be installed in editable mode (using the –editable option) or not.
For editable installs, the clone location by default is <venv path>/src/SomeProject in virtual environments, and <cwd>/src/SomeProject for global installs. The –src option can be used to modify this location.
For non-editable installs, the project is built locally in a temp dir and then installed normally. `

How do I find which rpm package supplies a file I'm looking for?

As an example, I am looking for a mod_files.sh file which presumably would come with the php-devel package. I guessed that yum would install the mod_files.sh file with the php-devel x86_64 5.1.6-23.2.el5_3 package, but the file appears to not to be installed on my filesystem.
How do I find out which package installs a specific file? I'm looking for where I have not necessarily already locally downloaded the package which may include the file that I'm looking for.
I'm using CentOS 5.
This is an old question, but the current answers are incorrect :)
Use yum whatprovides, with the absolute path to the file you want (which may be wildcarded). For example:
yum whatprovides '*bin/grep'
Returns
grep-2.5.1-55.el5.x86_64 : The GNU versions of grep pattern matching utilities.
Repo : base
Matched from:
Filename : /bin/grep
You may prefer the output and speed of the repoquery tool, available in the yum-utils package.
sudo yum install yum-utils
repoquery --whatprovides '*bin/grep'
grep-0:2.5.1-55.el5.x86_64
grep-0:2.5.1-55.el5.x86_64
repoquery can do other queries such as listing package contents, dependencies, reverse-dependencies, etc.
To know the package owning (or providing) an already installed file:
rpm -qf myfilename
The most popular answer is incomplete:
Since this search will generally be performed only for files from installed packages, yum whatprovides is made blisteringly fast by disabling all external repos (the implicit "installed" repo can't be disabled).
yum --disablerepo=* whatprovides <file>
You go to http://www.rpmfind.net and search for the file.
You'll get results for a lot of different distros and versions, but quite likely Fedora and/or CentOS will pop up too and you'll know the package name to install with yum
Well finding the package when you are connected to internet (repository) is easy however when you only have access to RPM packages inside Redhat or Centos DVD (this happens frequently to me when I have to recover a server and I need an application) I recommend using the commands below which is completely independent of internet and repositories. (supposably you have lots of uninstalled packages in a DVD).
Let's say you have mounted Package folder in ~/cent_os_dvd and you are looking for a package that provides "semanage" then you can run:
for file in `find ~/cent_os_dvd/ -iname '*.rpm'`; do rpm -qlp $file |grep '.*bin/semanage'; if [ $? -eq 0 ]; then echo "is in";echo $file ; fi; done
Using only the rpm utility, this should work in any OS that has rpm:
rpm -q --whatprovides [file name]
Ref. https://www.thegeekdiary.com/how-to-find-which-rpm-package-provides-a-specific-file-or-library-in-rhel-centos/
You can do this alike here but with your package. In my case, it was lsb_release
Run: yum whatprovides lsb_release
Response:
redhat-lsb-core-4.1-24.el7.i686 : LSB Core module support
Repo : rhel-7-server-rpms
Matched from:
Filename : /usr/bin/lsb_release
redhat-lsb-core-4.1-24.el7.x86_64 : LSB Core module support
Repo : rhel-7-server-rpms
Matched from:
Filename : /usr/bin/lsb_release
redhat-lsb-core-4.1-27.el7.i686 : LSB Core module support
Repo : rhel-7-server-rpms
Matched from:
Filename : /usr/bin/lsb_release
redhat-lsb-core-4.1-27.el7.x86_64 : LSB Core module support
Repo : rhel-7-server-rpms
Matched from:
Filename : /usr/bin/lsb_release`
Run to install: yum install redhat-lsb-core
The package name SHOULD be without number and system type so yum packager can choose what is best for him.