How do I install the hg-git plugin on Debian Stretch? - easy-install

Debian Jessie, as well as sid, have a mercurial-git package which contains the hg-git plugin. However, this package was (auto-)removed from Debian Stretch to to a release-critical bug.
But - I need it installed and running. Surely this should be possible, right?
Well, I followed the installation instructions on the plugin page:
I ran apt-get install python-setuptools python-setuptools-git python4-setuptools python3-setuptools-git
I ran easy_install hg-git and it seemed to work
But still, when I run various mercurial operations I get, as the first line, the error message:
*** failed to import extension hgext.git: No module named git
(regardless of whether I'm doing anything git-related or not.)
My questions:
Why is this happening?
What do I need to do in order to make the error message go away while having hggit working?
Now,
How do I correctly install dulwich to get hg-git working on Windows?

Apparently, that critical bug doesn't manifest always (and perhaps only under very specific circumstances), so you can try installing the Debian sid version of the mercurial-git package (that is, version 0.8.11-1 at the time of writing). There's a SuperUser question about how to do this:
https://linuxaria.com/howto/how-to-install-a-single-package-from-debian-sid-or-debian-testing
my personal opinion in this case is to simply install the .deb file, which you can get from here (it's not platform-specific; at the link you'll need to choose a mirror.) That makes the error message go away, at least assuming you have:
[extensions]
hgext.bookmarks =
hggit =
in your ~/.hgrc file.

Related

fix setuptools version when installing libraries using setup.py

This question is somewhat similar to the one here, but I cannot make it work.
So suppose that I have a set of packages (say 2) to install and I want to use pipenv. If I do pipenv install on the directory with a suitable Pipfile the installation fails because there is some metadata issue when installing one of the libraries (say libX) contained in install_requirements of one of the packages. It seems that the problem can be fixed by downgrading the version of setuptools to <=58.0.0.
OK. Now, if I first install that version of setuptools<=58.0.0 in the venv and then install my packages, everything works fine. The issue is that the Pipenvfile does not respect the order when installing, so something like
[packages]
setuptools = "<=58.0.0"
pckg1 = {<github path 1>}
pckg2 = {<github path 2>}
is not ensured to work. Also, by default the seed packages added to the venv include setuptools==65.6.3.
So the idea is to be able to restrict the version of setuptools that is used to check the metadata of the libraries in libX, to mimic the above scenario in which setuptools was installed first. Is there a way to do that?
I have tried placing setuptools<=58.0.0 at the top of the requirements.txt that defines the install_requirements of the problematic package, but it does not work.
If have also tried to fix or restrict the version of libX contained in that requirements.txt file but, surprisingly, pipenvdoes not seem to care: a verbose install shows that it keeps downgrading libX well below the restriction - "using cached libX-vX.X.X"- until it uses a version for which the metadata generation fails (why on earth does it do that, even if I call it with pipenv --clear install?).
I am a bit lost about what could be the best solution here. Any help would be very appreciated.

Cannot use Swift on Ubuntu 18.04

After conscientiously following the install instructions on Linux from swift.org, I encounter an issue where it is not possible to compile anything on a Ubuntu 18.04 machine. The REPL seems to work but during compilation (when calling swift build) the following error appears:
/usr/bin/ld: cannot find -lstdc++
There are more details in the full bug report [SR-9093]. I don't know at all what to do to solve this issue, there are similar problems already mentioned in other bug reports, for instance on this really old one [SR-35].
What should I do?
Thank you
I am assuming that you had already installed the libstdc++ successfully and you have set the permissions properly. But I really doubt that it was installed correctly but it was installed with corruption of some sort. The corruption occurred because you didn't install libstdc++ via a package manager. Result was some form of weirdness in the package manager database which effected the overall functioning system. Exactly why adding something to a folder should change anything at all. I don't know why this happens, unless the folder is hot i.e symbolically linked to a program which doesn't have any tolerance for hacks like simply copying a file into the folder. So for now try to install the libstdc++ again. Below is the link to the file to again download the correct program and this is compatible with amd64.
http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
And below are some link to help
https://ubuntuforums.org/showthread.php?t=1425470
https://ubuntuforums.org/showthread.php?t=808045
https://ubuntuforums.org/showthread.php?t=808045
https://packages.ubuntu.com/search?keywords=libstdc%2B%2B
https://packages.ubuntu.com/xenial/amd64/libstdc++6
Install libstdc++
sudo apt install libstdc++6
It seems possible that the apt install did not run the ldconfig program, which should be run to add the library to the list of those which ld.so knows about.
It looks like you can do it manually:
sudo ldconfig
IMPORTANT CAVEAT: I don't have Ubuntu and haven't been able to test this. And it's a sudo command. Run at your own risk, YMMV, etc.
If this does not work, it's possible that a file called /etc/ld.so.conf is not set up to search the directory where libstdc++ ended up. I wouldn't dare try to describe how to fix that.
sudo apt install -f
The command above should install any missing dependencies.

Error on Yum update

I'm unfortunately not very experienced in CentOS administration, and was hoping someone might be able to help me understand and get past a small hurdle. I was hoping to run yum update on the system, but ran into some Transaction Check Errors:
file /etc/php.ini from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/curl.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/fileinfo.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/phar.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/pdo.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/pdo_sqlite.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/sqlite3.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
It sort of looks like it's saying that some newer version files are conflicting with older version files. Is there a standard way to fix this? I was mainly just trying to update so that I could install Java later, but wasn't expecting to run into these errors. If it helps, the server is mainly being used for hosting a few websites with apache and mysql. Thanks so much for any help, it's greatly appreciated.
Edit: To add some more clarification, I had previously edited the baseurl variable in the /etc/yum.repos.d/centalt.repo file, which was originally set to
baseurl=centos.alt.ru/repository/centos/6/$basearch
The reason I changed the location was because I was previously getting an error when trying to run yum update, mentioned in this other stackoverflow question https://unix.stackexchange.com/questions/132674/repository-metadata-repomd-xml-for-repository-mratwork-centalt which had an answer recommending replacing the URL with
baseurl=mirror.sysadminguide.net/centalt/repository/centos/6/$basearch
Is there a different url I should be using instead?
You have a non-official repository which provides the php55-* packages which conflict with the official php-* packages.
You currently have the php-* versions installed.
If you want to switch you can try manually installing the matching php55-* package for every php-* package you have installed in one yum command (though that may not work).
If it doesn't, you might need to remove all the php packages you have installed first and then install the php55 versions after that.

Error installing mail-stack-delivery

So, I'm trying to set up an E-Mail server on an Ubuntu 10.04 VPS and when I try to use the command sudo apt-get install mail-stack-delivery (the package that I usually would use to get postfix and dovecot) it throws an error saying
E: Couldn't find package mail-stack-delivery
I was wondering if anybody has had this issue before or sees something I'm doing blatantly wrong? I set up a test server earlier today using the exact same command and the package installed just fine.
EDIT: This is a fresh server, I have not done anything to it beyond whatever stock configuration is done by ChicagoVPS
Okay, the problem was that the file '/etc/apt/sources.list' didn't contain the universe repository. To fix this, just edit it with VIM and add the repository.

How to get p5-Switch on ubuntu 12.10

I was using ubuntu 12.04 until 12.10 was released. I used ubuntu for software development and after installing 12.10, i noticed that the perl version (5.14) shipped with 12.10 does not include the Switch.pm module needed while building WebKiT-GTK.
Looking around on the internet i found few suggestions indicating that i should install something call p5-switch from something called ports. I have looked around and was not able to get this done. I am not a perl guy and have no idea where i can get this package.
Can someone please help me as to
1. Where to download the package for ubuntu 12.10
2. In case it is not a .deb, How do i install it.
OR
1. At least be able to downgrade the perl installation to something lower than 5.14
Thanks and Regards
~Sameer
sudo apt-get install libswitch-perl
will install it for you.
"ports" is a *BSD packaging system of sorts, not what you should be looking for.
You can find what package has a particular perl module by going to packages.ubuntu.com, entering Module/Name.pm (in this case, Switch.pm) in the "Search the contents of packages" form and checking "packages that contain files whose names end with the keyword" and selecting the desired distribution, then making sure you ignore false hits like CGI/Switch.pm in the results. Debian has the identical search for its packages at packages.debian.org.
(Note that Switch.pm has serious limitations, was never really intended to be used in production, and should certainly not be used in new code.)
Do make sure you've checked properly that there isn't the Switch module available via apt. If it is available, that's the one you want.
No, then you've two options the longer, correct way and a shorter way that's not quite as clean.
1. Longer
Install cpanm and perlbrew with apt. The perlbrew tool lets you install a complete version of Perl from scratch in a separate directory. Set up a user for your webkit building, run perlbrew as that user, install your perl. Then, use cpanm to install required modules and you are done. A bit of googling will get you step-by-step examples of how to use these tools. If anything goes badly wrong, you can just delete all the files in that user's home directory and start again - all you waste is a little time.
The reason experienced Perl people prefer this is that it keeps the perl you want for webkit-gtk separate from your system perl that ubuntu's packages will expect to be unchanged from the one they ship.
2. Shorter
Install cpanm with apt. As root, run "cpanm Switch" and it will install the Switch.pm package and any dependencies. It will also upgrade any already installed packages it thinks it needs to. This last step is why this option isn't ideal. In the (rare) case when the update isn't compatible with something else on your system uninstalling is fiddly.