How to find out name of package I want to remove with Yum in Amazon Fedora EC2 instance - fedora

So I installed Python 3.7 on my EC2 Fedora instance with Yum, later I needed to remove it. However, when I did yum -list, it showed all the "sub-packages" installed with python.
I just typed yum remove python3 and it worked, but what is the "proper" way of figuring out what name you need to type to remove a package cleaningly?

Your question is not very clear, but I'll try to answer.
1. You installed python3.7 your self
when you installed python3.7, you typed
yum install python3
so if you want to remove it, you can type the same name that you use to install it:
yum remove python3
2. someone else installed it
In this case you can trace the binary that you want to remove, let's say python3.7. First you can see what is the full path of that binary:
which python3.7
which gives
/usr/bin/python3.7
now you can query which package installed that file:
rpm -qf /usr/bin/python3.7
which will yield the full package name, something like:
python36-3.6.8-2.module_el8.0.0+33+0a10c0e1.x86_64
which you can then use to remove it:
yum remove python36-3.6.8-2.module_el8.0.0+33+0a10c0e1.x86_64

Related

Add alias to installed rpm

First a small situation sketch. We have CentOS 7 and we want to install the opensource version of Oreka (http://oreka.sourceforge.net/). However the software hasn't received updates since 2013.
So we found that in the install script it looks for the rpm package mysql-server. But rpm -q returns package not found since the name is mysql-community-server now. So the question is can we add the alias "mysql-server" somehow to "mysql-community-server" to fool the script. This would be more convenient than rebuilding the install script/package.
You can make your own empty RPM that "Provides" mysql-server and "Requires" mysql-community-server to do this kind of aliasing. You can call it something like mysql-server-compat-myorg.

Trying to access MySQL with perl script [duplicate]

Install information:
Using DBI 1.608 (for perl 5.008009 on x86_64-linux) installed in /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/auto/DBI/
error information:
[root#datacenterETL DBD-mysql-4.020]# perl ../testConnect.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in #INC (#INC contains: /usr/local/lib/perl5/5.8.9/x86_64-linux /usr/local/lib/perl5/5.8.9 /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.9 .) at (eval 3) line 3.
Perhaps the DBD::mysql Perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right.
It looks like you're using Linux. In that case, you might find it easier to install a pre-packaged version of the module.
On a Red Hat derivative try yum install perl-DBD-mysql; on a Debian derivative try apt-get install libdbd-mysql-perl.
Perhaps the DBD::mysql perl module hasn't been fully installed
...so install it.
cpan DBD::mysql
Or since you don't have internet access,
perl Makefile.PL
make
make test
make install
You'll need MySQL's development header files installed first, as per INSTALL
any error related to DBD::mysql error has not installed fully. Please run the below code in super user permission.
apt-get install libdbd-mysql-perl
As is was not able to comment (yet), I want to add something for the Mac Users.
I hat to add the --force command to install the everything properly as i have no local mySQL installation for the tests to pass.
/usr/bin/cpanm --force DBD::mysql worked for me. (Mac OS 10.9.2, Perl 5.12.4)
I've been tried perl -MCPAN -e shell on my mac OSX 10.8.5, but this didn't work.
I tried sudo perl -MCPAN ..., but didn't work too. I changed my ~.bash_profile to include
LD_RUN_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_RUN_PATH
LD_LIBRARY_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_LIBRARY_PATH
lines, and I tried -MCPAN again, with and without sudo, but this didn't work too.
I read some posts and I tried "get Bundle::DBD::mysql" in -MCPAN command line to download it and install with Makefile. Then, I entered the ~./cpan/build directory and I did a Makefile, but the make command didn't work. I tried Makefile with --testuser and --testpassword that I just had been configure in mysql. I entered the site https://discussions.apple.com/thread/3932531?start=0&tstart=0&fb_source=message that is informed in README doc of ./cpan/bundle, but I already had all command line tools of xCode installed and didn't work for me too.
Why don't do sudo perl -MCPAN -e shell and to force to install Bundle::DBD::mysql? This worked well and I got the installation.

iGraph install error with Python Anywhere

I'm trying to run a web app (built with flask-wtforms and using iGraph) on Pythonanywhere. As igraph isn't part of the already inculded modules, I try and install it using the bash console, as such:
pip install --user python-igraph
How ever, what I get is:
Could not download and compile the C core of igraph.
It usually means (according to other people having the same issue on Stackoverflow) that I need to first install:
sudo apt-get install -y libigraph0-dev
Except, apt-get isn't available on Pythonanywhere, as far as I know.
Is there any workaround to install the iGraph module for Python 2.7 on Pythonanywhere?
python-igraph installed perfectly fine in my account. My guess is that you're facing a different issue to a missing library. Perhaps a network error or something like that.

R: installing RMySQL package failed

I am trying to install RMySQL package in R, by install.packages("RMySQL"), but it complains that it couldn't find the include libraries.
Configuration error:
could not find the MySQL installation include and/or library
directories. Manually specify the location of the MySQL
libraries and the header files and re-run R CMD INSTALL.
So, then I installed mysql in Ubuntu as follows:
sudo apt-get install mysql-client
This installation worked fine, but still I get the same error in R. Can someone point me to the right direction please?
I've checked this
http://packages.ubuntu.com/search?keywords=r-cran-rmysql
so you should have r-cran-rmysql package inside your Ubuntu packages list. Therefore
from inside R remove DBI, RMySQL packages,
then sudo apt-get install r-cran-rmysql
HTH

What is a yum package conflict?

When running the transaction check to install mysql i'm getting:
Processing Conflict: mysql55-5.5.29-1.w6.x86_64 conflicts mysql < 5.5
I guess this means i'm attempting to install a package called mysql55-5.5.29-1.w6.x86_64 on to a system with mysql already installed but somehow there is a conflict?
yum says that mysql isn't installed so it was installed without using the repositories. In that case how does yum know there is confict?
it would be good to better under what 'confict' means.
There are many online yum repo available and all are free opensource contribute. So source packages are compiled with different options in each repo. So when we add 2 or more yum repo at a time, it may happen that 2 or more packages are of same version are selected and we get a conflict error.
In your case you added some repo which is providing mysql 5.5 which is already available with some other name in some other repo or already installed but new mysql package is selected by yum for any other package as dependency. Try removing one of the repo or try installing it as yum install mysql-5.5*
You can try this : yum list | grep mysql. It will list mysql in different packages, then you can make a decision to remove one of them and install mysql again.