Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need to install libmemcache onto a CentOS box. I don't have root privileges, so preferably everything would go somewhere inside my home directory.
I've tried downloading libmemcached-1.0.12.tar.gz and building it with ./configure --prefix=/home/charrison, make install, but this inscrutably failed. Something clued me to install libevent, which helped somewhat, but ultimately the libmemcached make is now failing as follows:
In file included from ./libmemcached/common.h:72,
from ./libmemcached/csl/common.h:40,
from libmemcached/csl/context.cc:38:
./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
And, even if I resolved that, who knows how many more prerequisites exist?
Then it occurred to me "Hey, isn't this what 'package managers' are for? To know about and install prerequisites?" I discovered that RPM is the CentOS package manager, but I drowned in the man page. I'm not even sure whether it is capable of downloading packages or knowing about dependencies.
The only "package manager" I have any experience with is cpan, which is pretty powerful and simple.
So I'd really like to know
how to install libmemcached in CentOS privately, and if possible,
what a package manager does and does not do
Here is my answer to the two questions. Hope it helps you.
how to install libmemcached in CentOS privately, and if possible,
(Step 1) download libmemcached RPM package from CentOS mirror site such as ftp://ftp.riken.jp/Linux/centos/<centos version>/os/<your arch>/Packages/.
(Step 2) extract the package in a current directory by using rpm2cpio command.
e.g., $ mkdir foo; cd foo; rpm2cpio ../libmemcached-*.rpm | cpio -di
what a package manager does and does not do
rpm command allows you to find out what packages are installed(*1).
Also, you can confirm the dependencies among multiple packages(*2), what package the specified file belongs to(*3) and what files the specified package contains(*4).
(*1) e.g., $ rpm -qa
(*2) e.g., $ rpm -q --requires foo
(*3) e.g., $ rpm -qf /etc/foo.conf
(*4) e.g., $ rpm -ql foo
I think that Maximum RPM(http://www.rpm.org/max-rpm/) is very useful site for you.
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 days ago.
Improve this question
In the process of packaging Apache AGE postgres extension (createing a .deb package), I installed it from source using make install. After successfully creating the debian package I also installed it using dpkg --install <package name>.
Now to test that the deb file is working correctly I used sudo make uninstall to uninstall it.
ahmar#raze:~$ sudo make uninstall
[sudo] password for ahmar:
rm -f '/usr/lib/postgresql/12/lib/age.so'
rm -f '/usr/share/postgresql/12/extension'/age.control
rm -f '/usr/share/postgresql/12/extension'/age--1.1.1.sql
rm -rf '/usr/lib/postgresql/12/lib/bitcode/age/'
rm -f '/usr/lib/postgresql/12/lib/bitcode/age.index.bc'
Before installing it again using dpkg --install <package name>, I ran the apt list --installed | grep age command to see it it got removed properly but its still shows as installed.
ahmar#raze:~$ apt list --installed | grep age
age/now 1.1.1-1 all [installed,local]
Although, postgres says that it got removed.
postgres=# CREATE EXTENSION age;
ERROR: could not open extension control file "/usr/share/postgresql/12/extension/age.control": No such file or directory
How can I properly remove it?
Since make install and debian install will place the same binary files in the postgreSQL extension folder, so if you just remove the extension by sudo make uninstall , then it'll remove the age from postgreSQL extension, and hence all the files that were copied from debian install.
But it'll still show that the package is installed apt list --installed even though it's binaries have been deleted, because the list of installed packages is stored in /var/lib/dpkg/status.
So to remove it from the list also, use sudo apt purge <package-name> here age
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
If I have both /usr/bin/perl and /usr/local/bin/perl available on a system, which one should I use?
This question is unanswerable cleanly, without more informations and like - so only few remarks.
are you sure than you have two perls? The one could be an symbolic link to the another, for example the /usr/bin/perl -> /usr/local/bin/perl.
if they're aren't symlinked
the /usr/bin/perl is probably the system-wide perl, which comes with your basic system installation
and the /usr/local/bin/perl is installed by some package-management
just try:
/usr/bin/perl -V
and /usr/local/bin/perl -V
if they're different versions - someone installed to your system one additional perl
also, you could try which one is executed when you type perl - e.g. which one is first in your path. type perl could help. Or the simple perl -V.
Which one you should to use? Probably the package installed one, because your package-manager will install the CPAN-modules to the right location. Isn't possible to tell, which one it is. But this depends on your system's package management.
If you doubt, just install your own perl. I recommending to you
check the anyenv - here: https://github.com/riywo/anyenv
after installing the anyenv you could install the plenv (you could install plenv without anyenv too - but anyenv could help you with other interpreters too in the future)
install plenv with anyenv install plenv
after you got installed the plenv, you could install any perl version what is available and which one you want, using the:
plenv install 5.16.2 #or similar command
read about the plenv here: https://github.com/tokuhirom/plenv
You will get your own perl, and could install any CPAN module without the risk overriding your system perl modules. Also, you don't need to be admin. Simple, nice and clean.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
As with many people whose sites are hosted on shared servers, I do not have root access, and the hosting company will not install Perl modules at the request of users.
Unfortunately, I also do not have write privileges to the ~/ folder, only to certain subfolders (such as ~/cgi-bin/).
I've attempted the solution suggested here, changing ~/perl5 to ~/cgi-bin/perl5 (which I created), but I keep getting this error:
"Can't write to cpanm home '~/.cpanm': You should fix it with
chown/chmod first."
The problem is, as I stated, I don't have write privileges to ~/.
Is there some way to tell the installer to use ~/cgi-bin/.cpanm instead? I've tried to figure it out by searching on here and elsewhere on the internet, but I'm starting to bash my head against the wall.
EDIT : So I've tried the suggestion by Steven below, using this command:
HOME=$HOME/cgi-bin cpanm local::lib
Now, cpanm successfully runs and tries to install the module, but has numerous warnings throughout the installation and ultimately fails (presumably something is still trying to write to a forbidden folder??).
Here are some sample warnings:
Warning: prerequisite CPAN 1.82 not found. We have 1.7601.
Warning: prerequisite ExtUtils::Install 1.43 not found. We have 1.32.
Warning: prerequisite ExtUtils::MakeMaker 6.42 not found. We have 6.17.
Warning: prerequisite Module::Build 0.36 not found.
Warning: You do not have permissions to install into /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi at /usr/lib/perl5/5.8.5/ExtUtils/Install.pm line 114.
mkdir /usr/lib/perl5/5.8.5/App: Permission denied at /usr/lib/perl5/5.8.5/ExtUtils/Install.pm line 176
make: *** [pure_perl_install] Error 255
~ is just a shorthand way of accessing the environment variable $HOME, so you should be able to do something like export HOME=$HOME/cgi-bin to move your effective home directory down into some directory you have write permissions for. This will affect many things, however, so be careful.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just try install libperl-dev with apt on Ubuntu, but I have following error:
user#comp-2:~$ sudo apt-get install libperl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libperl-dev : Depends: perl (= 5.14.2-6ubuntu2) but 5.14.2-6ubuntu2.1 is to be installed
Depends: libperl5.14 (= 5.14.2-6ubuntu2) but 5.14.2-6ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.
I tried to google the problem but didn't found something clear.
Can some one explain me what it's mean: "Depends: libperl5.14 (= 5.14.2-6ubuntu2) but 5.14.2-6ubuntu2.1 is to be installed", and how to solve it?
Thank you for ahead.
Basically the error message tells you all three packages (libperl-dev, perl and libperl5.14) need to have exactly the same version (either 5.14.2-6ubuntu2 or 5.14.2-6ubuntu2.1), but you are trying to mix the two. I can't tell you why is that (maybe you are trying to mix packages from different distributions, something like debian testing/unstable), but if you used aptitude, you could examine the situation in an interactive dependency solver (maybe it would even find an acceptable solution for you automatically).
So, use aptitude and examine the versions of the packages, both those you are trying to install and those you already have.
No direct answer to your question but a way to avoid it occurring:
You should not fiddle around with your systems Perl to much. Because a lot of system-packages depend on the systems Perl. If you screw this up, your system might run into troubles.
If you want to be flexible with Perl installations always use Perlbrew! Go to this site, it is very easy: http://perlbrew.pl/ Perlbrew manages different Perls, and all is safely in your $home. (Perlbrew is also on CPAN or available as .deb package, but use the website above, it is saver)
If you then add this line to your .bashrc
# Perl is always from perlbrew!
source ~/perl5/perlbrew/etc/bashrc
You can use the perlbrew commands on your terminal to easily switch between Perl installations.
Maybe this helps you?
Regards
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm building OpenLDAP on a RHEL 5; I used instructions found at http://www.linux.com/archive/feature/113607.
All went well, until running './configure' for OpenLDAP - the following error was recorded:
*<earlier output snipped>*
checking for gethostbyaddr_r... yes
checking number of arguments of ctime_r... 2
checking number of arguments of gethostbyname_r... 6
checking number of arguments of gethostbyaddr_r... 8
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for Berkeley DB major version in db.h... 5
checking for Berkeley DB minor version in db.h... 1
checking if Berkeley DB version supported by BDB/HDB backends... yes
**checking for Berkeley DB link (default)... no
configure: error: BDB/HDB: BerkeleyDB not available**
I have Googled like a maniac but have been unsuccessful to find a resolution - any tips on areas to explore?
Thanks
do yum install db4-devel
(or just install the prepackaged openldap, yum install openldap-servers openldap-clients
Seems you are using tarball installation, first you should install Berkeley DB. You can find it from oracle website at Oracle Berkeley DB Downloads. Compile and install it.
cd db-4.7.25.NC
. ./dist/configure
make
make install
cd /usr/local/BerkeleyDB.4.7/
This will install BerkeleyDB. Now you need to provide the location to successfully compile OpenLDAP.
export CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include"
export LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib -Wl,-R,/usr/local/BerkeleyDB.4.7/lib -Wl,--enable-new-dtags"
# Build OpenLDAP
...
If you don't set RPATH then you should add LD_LIBRARY_PATH to /etc/profile.
export LD_LIBRARY_PATH="/usr/local/BerkeleyDB.4.7/lib"
After this compile OpenLDAP, let me know if you face any issue.
For CentOS 7, do yum install libdb-devel. libdb4-devel did not work for me.
debian try:
aptitude install libdb5.1 libdb5.1-dev libdb5.1-dbg
apt-get install libdb-dev worked for me in Ubuntu Server.