Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

I nuked Now postgres don't want to talk to me

by pvaldes (Chaplain)
on Apr 12, 2017 at 15:03 UTC ( [id://1187776] : perlquestion . print w/replies, xml ) Need Help??

pvaldes has asked for the wisdom of the Perl Monks concerning the following question:

$ CPAN "There is an upgrade available to cpan" (grreeeat) "Do you want to install it instead using the old version available in +Debian testing?" (whynot?... yup) Hum... this is taking a lot of time and I need to go out. I'll stop it

No good idea remains unpunished. Now all my perl scripts refuse to run sending this message

Can't locate in /usr/local/lib/x86_64-linux-gnu/perl/5.24.1/ Denied permission at myperlscript line 4

Strangely my sql scripts started crashing with exactly the same message; And this is how I discovered that psql is in fact a perl script (awesome!)

I tried to rm cpan and to reinstall cpan two or three times, but the problem is not solved. I'll appreciate any suggestion about how to clean the blood in this train wreck and reboot perl. Thanks

UPDATED: I can run perl scripts as root still (but not psql)

Replies are listed 'Best First'.
Re: I nuked Now postgres don't want to talk to me
by davido (Cardinal) on Apr 12, 2017 at 15:22 UTC

      Some notes:

      In order to have the perl commmand working again I had to restore and (called by diagnostics), chmod o+r them, and restore exec for other (chmod o+x) in several parent directories.

      in order to restore psql I had to reinstall again libsocket-perl to upgrade socket object version, restore, and chmod o+r them

      By now is working and I'm learning, so is a happy end. Revenge against CPAN pending. There is nothing like putting yourself in troubles and out of your commandfort zone sometimes

Re: I nuked Now postgres don't want to talk to me
by afoken (Chancellor) on Apr 12, 2017 at 15:08 UTC

    Permission denied sounds like you messed up the permissions of (should be -rw-r--r-- = 0644) or of one of the directories leading there (should be drwxr-xr-x = 0755).

    How old is your last verifed backup? ;-)


    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Yes and could be worse. I found a file named in /usr/lib/x86_64-linux-gnu/perl-base/ but not in the other directory. It seems that perl is looking in the wrong place. Maybe I had lost some links?

      Apt remove perl && apt install --reinstall perl didn't worked. Lets keep breaking things...

      Updated name of the module strict

Re: I nuked Now postgres don't want to talk to me
by shmem (Chancellor) on Apr 12, 2017 at 17:26 UTC
    (Title) I nuked Now postgres don't want to talk to me
    (Body) Can't locate in /usr/local/lib/x86_64-linux-gnu/perl/5.24.1/

    Which one, or ? I guess, but you keep writing even in your replies. There's no such file in the perl core.

    Get your perl version running perl -v. Get the tarball of that perl version from Unpack that tarball, locate there. Run perl -le 'print for @INC' and copy the from the unpacked tarball directory over to one of the locations shown by the last command, make it world readable. You should now be able to run into other errors. As soon as your perl is functional, re-install perl (and maybe perl-base, depending on what you are running) with your system's package manager.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

      Is a typo. I wanted to say Keen eye for details :-) I didn't even notice it. Fixed.

Re: I nuked Now postgres don't want to talk to me
by karlgoethebier (Abbot) on Apr 12, 2017 at 18:08 UTC
    "...nuked...don't want to talk to me"

    I don't remember how often i've been bitten by something like this on SLES, Debian, Ubuntu & Mac OS X. Résumé/Conclusion: Combining VMWare with Perlbrew seems to be a solid solution to avoid such trouble.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    Furthermore I consider that Donald Trump must be impeached as soon as possible