Discussion:
Linux converting from manual installation to PPA woes.
John Reay
2017-11-25 22:05:08 UTC
Permalink
I upgraded from Mint 17.3 to Mint 18, and unfortunately I started
getting segmentation errors with get_iplayer. So I decided to replace
my now broken manual installation with the PPA version. The manual
installation doesn't come with uninstall instructions so I deleted the
executable in /usr/local/bin. However even though 'which get_iplayer'
returns /usr/bin (the location where the PPA version is installed)
when I try to run it, something is still pointing to /usr/local/bin.
Does anyone have any idea how to cleanly uninstall the version I
manually installed?

Incidentally, I tried to post this message in the get_iplayer forum,
but every time I try I get a MyBB error. Someone was having a similar
problem over there.

...John Reay
Ralph Corderoy
2017-11-25 22:19:25 UTC
Permalink
Hi John,
so I deleted the executable in /usr/local/bin. However even though
'which get_iplayer' returns /usr/bin (the location where the PPA
version is installed) when I try to run it, something is still
pointing to /usr/local/bin.
How do you know this?

Try `type get_iplayer' as an alternative to which(1). That's built-in
to the bash shell you're using and tells you what it will do. Is your
$PATH set up to have /usr/local/bin before /usr/bin? What happens if
you give an explicit path to run it, i.e. /usr/bin/get_iplayer?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
John Reay
2017-11-26 03:39:01 UTC
Permalink
***@system7 ~ $ type get_iplayer
get_iplayer is hashed (/usr/local/bin/get_iplayer)

***@system7 ~ $ echo $PATH
/home/john/perl5/bin:/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

***@system7 ~ $ which get_iplayer
/usr/bin/get_iplayer

***@system7 ~ $ get_iplayer
bash: /usr/local/bin/get_iplayer: No such file or directory

***@system7 ~ $ /usr/bin/get_iplayer --pid=b09fx651 --vmode=best --force
get_iplayer 3.06-ppa31a, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.
Matches:
350: BBC News at Ten - 22/11/2017, BBC One, b09fx651
INFO: 1 matching programmes
Post by Ralph Corderoy
Hi John,
so I deleted the executable in /usr/local/bin. However even though
'which get_iplayer' returns /usr/bin (the location where the PPA
version is installed) when I try to run it, something is still
pointing to /usr/local/bin.
How do you know this?
Try `type get_iplayer' as an alternative to which(1). That's built-in
to the bash shell you're using and tells you what it will do. Is your
$PATH set up to have /usr/local/bin before /usr/bin? What happens if
you give an explicit path to run it, i.e. /usr/bin/get_iplayer?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
John Reay
2017-11-26 04:10:01 UTC
Permalink
OK....I did some RTFM on 'type' and 'hash', which led me to open a new shell.
That solved my reported problem, but I'm now back to my initial
problem which is that when a run get_player I get "segmentation
fault".

get_iplayer 3.06 PPA version, Linux Mint 18
Post by John Reay
get_iplayer is hashed (/usr/local/bin/get_iplayer)
/home/john/perl5/bin:/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
/usr/bin/get_iplayer
bash: /usr/local/bin/get_iplayer: No such file or directory
get_iplayer 3.06-ppa31a, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.
350: BBC News at Ten - 22/11/2017, BBC One, b09fx651
INFO: 1 matching programmes
Post by Ralph Corderoy
Hi John,
so I deleted the executable in /usr/local/bin. However even though
'which get_iplayer' returns /usr/bin (the location where the PPA
version is installed) when I try to run it, something is still
pointing to /usr/local/bin.
How do you know this?
Try `type get_iplayer' as an alternative to which(1). That's built-in
to the bash shell you're using and tells you what it will do. Is your
$PATH set up to have /usr/local/bin before /usr/bin? What happens if
you give an explicit path to run it, i.e. /usr/bin/get_iplayer?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
Roger Bell_West
2017-11-26 08:18:05 UTC
Permalink
Post by John Reay
OK....I did some RTFM on 'type' and 'hash', which led me to open a new shell.
That solved my reported problem, but I'm now back to my initial
problem which is that when a run get_player I get "segmentation
fault".
Please post output which includes the error message you report.
John Reay
2017-11-26 12:57:24 UTC
Permalink
***@system7 ~ $ get_iplayer
get_iplayer 3.06-ppa31a, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

Segmentation fault


However, if I sudo, it works

***@system7 ~ $ sudo get_iplayer
[sudo] password for john:
get_iplayer 3.06-ppa31a, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.


INFO: Indexing tv programmes (concurrent)
..................................
INFO: Added 89 tv programmes to cache
Post by Roger Bell_West
Post by John Reay
OK....I did some RTFM on 'type' and 'hash', which led me to open a new shell.
That solved my reported problem, but I'm now back to my initial
problem which is that when a run get_player I get "segmentation
fault".
Please post output which includes the error message you report.
_______________________________________________
get_iplayer mailing list
http://lists.infradead.org/mailman/listinfo/get_iplayer
Ralph Corderoy
2017-11-26 13:12:21 UTC
Permalink
Hi John,
Post by John Reay
However, if I sudo, it works
Don't do that. :-)

This is Ubuntu? I wonder where the core dump is ending up. You could
`ulimit -c' to see the current limit on core-file size for that shell
and then `ulimit -c unlimited' if it's not that already.

Run `./get_iplayer --verbose' to see if that gives more of a clue how
far it's getting. If not, change that option to `--debug'.

If nothing is clearer, run it under strace to help show what process is
suffering. It should still suffer the SEGV.

strace -fe execve get_iplayer
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
John Reay
2017-11-26 15:05:10 UTC
Permalink
With --verbose I see a mismatch between the version of ffmpeg that
get_iplayer is attempting to use compared to the version returned by
type.
But which is correct?


***@system7 ~ $ get_iplayer --get 3004 --vmode=best --force --verbose
get_iplayer 3.06-ppa31a, Copyright (C) 2008-2010 Phil Lewis
This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
This is free software, and you are welcome to redistribute it under certain
conditions; use --conditions for details.

INFO: encodinglocale = UTF-8
INFO: encodinglocalefs = UTF-8
INFO: encodingconsoleout = UTF-8
INFO: encodingconsolein = UTF-8
INFO: ${^UNICODE} = 0
INFO: Profile dir: /home/john/.get_iplayer
INFO: User options file: /home/john/.get_iplayer/options
INFO: System options file: /etc/get_iplayer/options
Current options:
encodingconsolein = UTF-8
encodingconsoleout = UTF-8
encodinglocale = UTF-8
encodinglocalefs = UTF-8
ffmpeg = /usr/local/bin/ffmpeg
force = 1
get = 1
tvmode = best
verbose = 1

INFO: Search args: '3004'
INFO: Additionally getting cached programme data for tv
INFO: Got 5461 file cache entries for tv
Matches:
3004: Newsnight - 24/11/2017, BBC News, b09gk7qg
INFO: 1 matching programmes
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
INFO: Getting URL: http://www.bbc.co.uk/programmes/b09gk7qg.json
INFO: Getting URL:
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/b09gk7pz/transferformat/dash?cb=47344
Segmentation fault
***@system7 ~ $ which ffmpeg
/usr/bin/ffmpeg
***@system7 ~ $ type ffmpeg
ffmpeg is /usr/bin/ffmpeg
Post by Ralph Corderoy
Hi John,
Post by John Reay
However, if I sudo, it works
Don't do that. :-)
This is Ubuntu? I wonder where the core dump is ending up. You could
`ulimit -c' to see the current limit on core-file size for that shell
and then `ulimit -c unlimited' if it's not that already.
Run `./get_iplayer --verbose' to see if that gives more of a clue how
far it's getting. If not, change that option to `--debug'.
If nothing is clearer, run it under strace to help show what process is
suffering. It should still suffer the SEGV.
strace -fe execve get_iplayer
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
Ralph Corderoy
2017-11-26 15:10:30 UTC
Permalink
Hi John,
Post by John Reay
But which is correct?
Use the latest and greatest?

/usr/bin/ffmpeg -version
/usr/local/bin/ffmpeg -version
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
RS
2017-11-26 15:32:53 UTC
Permalink
From: John Reay
Sent: Sunday, November 26, 2017 3:05 PM
Post by John Reay
3004: Newsnight - 24/11/2017, BBC News, b09gk7qg
INFO: 1 matching programmes
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
INFO: Getting URL: http://www.bbc.co.uk/programmes/b09gk7qg.json
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/b09gk7pz/transferformat/dash?cb=47344
Segmentation fault
The only occurrence of the string "Getting URL" is at line 1629. I am
guessing, but the error may be in HTTP::Request, although it is a bit
strange that it has successfully called it once.

Again I am guessing, but is HTTP::Request part of LWP::Protocol? How you
check whether Perl has been configured with the correct version of
LWP::Protocol I'll have to leave someone else to answer.

Best wishes
Richard
RS
2017-11-26 17:50:40 UTC
Permalink
Post by RS
The only occurrence of the string "Getting URL" is at line 1629. I am
guessing, but the error may be in HTTP::Request, although it is a bit
strange that it has successfully called it once.
Again I am guessing, but is HTTP::Request part of LWP::Protocol? How you
check whether Perl has been configured with the correct version of
LWP::Protocol I'll have to leave someone else to answer.
According to this page
http://perldoc.perl.org/perlfaq3.html#How-do-I-find-which-modules-are-installed-on-my-system%3f

cpan -l

should tell you which Perl modules are installed, but when I tried it I was
told that cpan needed to be configured.

Best wishes
Richard
Roger Bell_West
2017-11-26 18:44:42 UTC
Permalink
Post by RS
Again I am guessing, but is HTTP::Request part of LWP::Protocol? How you
check whether Perl has been configured with the correct version of
LWP::Protocol I'll have to leave someone else to answer.
I think this is unlikely to be the answer (I think the OP has two
Perls installed, one of them broken, and running as root is invoking
the other one), but for the record:

perl -e 'use LWP::Protocol;print $LWP::Protocol::VERSION,"\n";'

R
John Reay
2017-11-26 19:41:51 UTC
Permalink
After due consideration I decided to trash my custom perl environment
(mostly because I couldn't recall why it was ever installed) and to
let Synaptic to a complete removal of get_iplayer and then install a
fresh copy from the PPA. Seems to have solved all my problems! Thanks
to all who made suggestions or otherwise helped!

Repaired using the sledgehammer method.
Post by Roger Bell_West
Post by RS
Again I am guessing, but is HTTP::Request part of LWP::Protocol? How you
check whether Perl has been configured with the correct version of
LWP::Protocol I'll have to leave someone else to answer.
I think this is unlikely to be the answer (I think the OP has two
Perls installed, one of them broken, and running as root is invoking
perl -e 'use LWP::Protocol;print $LWP::Protocol::VERSION,"\n";'
R
_______________________________________________
get_iplayer mailing list
http://lists.infradead.org/mailman/listinfo/get_iplayer
RS
2017-11-26 13:12:43 UTC
Permalink
From: Roger Bell_West
Sent: Sunday, November 26, 2017 8:18 AM
Post by Roger Bell_West
Post by John Reay
OK....I did some RTFM on 'type' and 'hash', which led me to open a new shell.
That solved my reported problem, but I'm now back to my initial
problem which is that when a run get_player I get "segmentation
fault".
Please post output which includes the error message you report.
I agree that it would be helpful to see the actual error message, possibly
accompanied with --debug output to narrow down where the error is occurring.

I am a novice when it comes to Linux (and Perl) so please excuse me if what
I say is not sensible or uses the wrong terminology.

Try
type -aP perl
perl -v

get_iplayer has been fairly well tested, so it may be other parts of John's
installation are at fault. It is clear from the output we have seen so far
that get_iplayer has been successfully invoked, and that it is the ppa
installation of v3.06, so the path to get_iplayer is not a problem. The
first command I have suggested should tell him if he has more than one
instance of Perl, possibly through not uninstalling the previous instance,
and the path to them. The second will identify the Perl version.
perl -V
will also identify the patches, but someone else will need to explain how to
identify the dependencies because that is beyond my level of knowledge.

Best wishes
Richard
John Reay
2017-11-26 14:27:44 UTC
Permalink
***@system7 ~ $ type -aP perl
/usr/bin/perl
***@system7 ~ $ perl -v

This is perl 5, version 22, subversion 1 (v5.22.1) built for
x86_64-linux-gnu-thread-multi
(with 60 registered patches, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Post by RS
From: Roger Bell_West
Sent: Sunday, November 26, 2017 8:18 AM
Post by Roger Bell_West
Post by John Reay
OK....I did some RTFM on 'type' and 'hash', which led me to open a new shell.
That solved my reported problem, but I'm now back to my initial
problem which is that when a run get_player I get "segmentation
fault".
Please post output which includes the error message you report.
I agree that it would be helpful to see the actual error message, possibly
accompanied with --debug output to narrow down where the error is occurring.
I am a novice when it comes to Linux (and Perl) so please excuse me if what
I say is not sensible or uses the wrong terminology.
Try
type -aP perl
perl -v
get_iplayer has been fairly well tested, so it may be other parts of John's
installation are at fault. It is clear from the output we have seen so far
that get_iplayer has been successfully invoked, and that it is the ppa
installation of v3.06, so the path to get_iplayer is not a problem. The
first command I have suggested should tell him if he has more than one
instance of Perl, possibly through not uninstalling the previous instance,
and the path to them. The second will identify the Perl version.
perl -V
will also identify the patches, but someone else will need to explain how to
identify the dependencies because that is beyond my level of knowledge.
Best wishes
Richard
_______________________________________________
get_iplayer mailing list
http://lists.infradead.org/mailman/listinfo/get_iplayer
Jeremy Nicoll - ml gip
2017-11-26 14:37:06 UTC
Permalink
Post by John Reay
/usr/bin/perl
But (not a linux expert here either) doesn't your earlier answer

***@system7 ~ $ echo $PATH
/home/john/perl5/bin:/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

suggest (right at the start) that there's another perl installed as
well?
--
Jeremy Nicoll - my opinions are my own
Loading...