fixing cpan by resetting it
So I ran into a simple little problem.
I wasn't connected to the internet and started cpan. It started to configure for the first time and then when I realised a few seconds later that the internet wasn't connected I hit Ctrl + C
When I connected to the internet and brought CPAN up again, it asked me to continue from where is left, but prompted me for a WHOLE lot of configuration options. I left them to default.
It then asked me for a mirror URL, I think I typed it incorrectly. Now cpan doesn't work at all!!
I would like to reset to the typical first start I'm used to where it will ask to configure everything for me.
I looked at this perlmonks post which suggested deleting /etc/perl/CPAN/Config.pm but it doesn't exist for me. /etc/perl doesn't exist itself.
Question: I'm on CentOS 6.4, how do I reset cpan?
centos perl cpan
add a comment |
So I ran into a simple little problem.
I wasn't connected to the internet and started cpan. It started to configure for the first time and then when I realised a few seconds later that the internet wasn't connected I hit Ctrl + C
When I connected to the internet and brought CPAN up again, it asked me to continue from where is left, but prompted me for a WHOLE lot of configuration options. I left them to default.
It then asked me for a mirror URL, I think I typed it incorrectly. Now cpan doesn't work at all!!
I would like to reset to the typical first start I'm used to where it will ask to configure everything for me.
I looked at this perlmonks post which suggested deleting /etc/perl/CPAN/Config.pm but it doesn't exist for me. /etc/perl doesn't exist itself.
Question: I'm on CentOS 6.4, how do I reset cpan?
centos perl cpan
add a comment |
So I ran into a simple little problem.
I wasn't connected to the internet and started cpan. It started to configure for the first time and then when I realised a few seconds later that the internet wasn't connected I hit Ctrl + C
When I connected to the internet and brought CPAN up again, it asked me to continue from where is left, but prompted me for a WHOLE lot of configuration options. I left them to default.
It then asked me for a mirror URL, I think I typed it incorrectly. Now cpan doesn't work at all!!
I would like to reset to the typical first start I'm used to where it will ask to configure everything for me.
I looked at this perlmonks post which suggested deleting /etc/perl/CPAN/Config.pm but it doesn't exist for me. /etc/perl doesn't exist itself.
Question: I'm on CentOS 6.4, how do I reset cpan?
centos perl cpan
So I ran into a simple little problem.
I wasn't connected to the internet and started cpan. It started to configure for the first time and then when I realised a few seconds later that the internet wasn't connected I hit Ctrl + C
When I connected to the internet and brought CPAN up again, it asked me to continue from where is left, but prompted me for a WHOLE lot of configuration options. I left them to default.
It then asked me for a mirror URL, I think I typed it incorrectly. Now cpan doesn't work at all!!
I would like to reset to the typical first start I'm used to where it will ask to configure everything for me.
I looked at this perlmonks post which suggested deleting /etc/perl/CPAN/Config.pm but it doesn't exist for me. /etc/perl doesn't exist itself.
Question: I'm on CentOS 6.4, how do I reset cpan?
centos perl cpan
centos perl cpan
edited Oct 23 '18 at 2:07
Rui F Ribeiro
39.2k1479130
39.2k1479130
asked Jul 11 '13 at 18:24
gideon
1831417
1831417
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
I believe cpan maintains its files in the directory of the user that ran it. So if it was root then they'd be in /root/.cpan. You can just blow this directory away completely.
Alternatively you can re-run the "wizard" that asks you all those CPAN questions using this command:
$ cpan o conf init
Thanks for your answer. I deleted the directory/root/.cpancpan still doesn't give me that first launch message, when I didsudo cpanthencpan> o conf initit ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D
– gideon
Jul 11 '13 at 18:51
add a comment |
Removing /root/.cpan certainly helps, but if you want to go back to the first launch message, you need to remove CPAN/Config.pm. To find out where it is, try:
perldoc -l CPAN
i.e.:
ls -l `dirname $(perldoc -l CPAN)`/CPAN/Config.pm
add a comment |
replace Config.pm with fixed version
wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz
tar -zxvf CPAN-2.16.tar.gz
sudo mkdir /usr/share/perl5/CPAN/ -p
sudo cp ./CPAN-2.16/lib/CPAN/FirstTime.pm /usr/share/perl5/CPAN/FirstTime.pm
source
add a comment |
On my shared hosting server, there is also a ~/.cpan/CPAN/MyConfig.pm file. Deleting the whole ~/.cpan folder did the job for me. Deleting /usr/share/perl5/CPAN/Config.pm requires root privilege so no can do for me.
This code works for me to reset and re-run cpan setup with no output (extracted from my sslcert cron script).
if [ -d ~/.cpan ]; then rm -fR ~/.cpan ; echo y | cpan > /dev/null 2>&1; fi
Same line also ran on my ubuntu desktop pc.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
delete /usr/share/perl5/CPAN/Config.pm and then run CPAN again
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f82676%2ffixing-cpan-by-resetting-it%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
I believe cpan maintains its files in the directory of the user that ran it. So if it was root then they'd be in /root/.cpan. You can just blow this directory away completely.
Alternatively you can re-run the "wizard" that asks you all those CPAN questions using this command:
$ cpan o conf init
Thanks for your answer. I deleted the directory/root/.cpancpan still doesn't give me that first launch message, when I didsudo cpanthencpan> o conf initit ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D
– gideon
Jul 11 '13 at 18:51
add a comment |
I believe cpan maintains its files in the directory of the user that ran it. So if it was root then they'd be in /root/.cpan. You can just blow this directory away completely.
Alternatively you can re-run the "wizard" that asks you all those CPAN questions using this command:
$ cpan o conf init
Thanks for your answer. I deleted the directory/root/.cpancpan still doesn't give me that first launch message, when I didsudo cpanthencpan> o conf initit ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D
– gideon
Jul 11 '13 at 18:51
add a comment |
I believe cpan maintains its files in the directory of the user that ran it. So if it was root then they'd be in /root/.cpan. You can just blow this directory away completely.
Alternatively you can re-run the "wizard" that asks you all those CPAN questions using this command:
$ cpan o conf init
I believe cpan maintains its files in the directory of the user that ran it. So if it was root then they'd be in /root/.cpan. You can just blow this directory away completely.
Alternatively you can re-run the "wizard" that asks you all those CPAN questions using this command:
$ cpan o conf init
edited Jul 11 '13 at 20:15
cjm
20.4k57073
20.4k57073
answered Jul 11 '13 at 18:40
slm♦
247k66513678
247k66513678
Thanks for your answer. I deleted the directory/root/.cpancpan still doesn't give me that first launch message, when I didsudo cpanthencpan> o conf initit ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D
– gideon
Jul 11 '13 at 18:51
add a comment |
Thanks for your answer. I deleted the directory/root/.cpancpan still doesn't give me that first launch message, when I didsudo cpanthencpan> o conf initit ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D
– gideon
Jul 11 '13 at 18:51
Thanks for your answer. I deleted the directory
/root/.cpan cpan still doesn't give me that first launch message, when I did sudo cpan then cpan> o conf init it ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D– gideon
Jul 11 '13 at 18:51
Thanks for your answer. I deleted the directory
/root/.cpan cpan still doesn't give me that first launch message, when I did sudo cpan then cpan> o conf init it ran all the regular auto configuration except the urllist config, but prompted me to do that. When I did it let me select a continent, country and gave me the right list of mirrors. It's all working now :D– gideon
Jul 11 '13 at 18:51
add a comment |
Removing /root/.cpan certainly helps, but if you want to go back to the first launch message, you need to remove CPAN/Config.pm. To find out where it is, try:
perldoc -l CPAN
i.e.:
ls -l `dirname $(perldoc -l CPAN)`/CPAN/Config.pm
add a comment |
Removing /root/.cpan certainly helps, but if you want to go back to the first launch message, you need to remove CPAN/Config.pm. To find out where it is, try:
perldoc -l CPAN
i.e.:
ls -l `dirname $(perldoc -l CPAN)`/CPAN/Config.pm
add a comment |
Removing /root/.cpan certainly helps, but if you want to go back to the first launch message, you need to remove CPAN/Config.pm. To find out where it is, try:
perldoc -l CPAN
i.e.:
ls -l `dirname $(perldoc -l CPAN)`/CPAN/Config.pm
Removing /root/.cpan certainly helps, but if you want to go back to the first launch message, you need to remove CPAN/Config.pm. To find out where it is, try:
perldoc -l CPAN
i.e.:
ls -l `dirname $(perldoc -l CPAN)`/CPAN/Config.pm
edited Sep 30 '14 at 10:31
Tejas
1,79621839
1,79621839
answered Sep 30 '14 at 9:39
Joao Costa
1212
1212
add a comment |
add a comment |
replace Config.pm with fixed version
wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz
tar -zxvf CPAN-2.16.tar.gz
sudo mkdir /usr/share/perl5/CPAN/ -p
sudo cp ./CPAN-2.16/lib/CPAN/FirstTime.pm /usr/share/perl5/CPAN/FirstTime.pm
source
add a comment |
replace Config.pm with fixed version
wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz
tar -zxvf CPAN-2.16.tar.gz
sudo mkdir /usr/share/perl5/CPAN/ -p
sudo cp ./CPAN-2.16/lib/CPAN/FirstTime.pm /usr/share/perl5/CPAN/FirstTime.pm
source
add a comment |
replace Config.pm with fixed version
wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz
tar -zxvf CPAN-2.16.tar.gz
sudo mkdir /usr/share/perl5/CPAN/ -p
sudo cp ./CPAN-2.16/lib/CPAN/FirstTime.pm /usr/share/perl5/CPAN/FirstTime.pm
source
replace Config.pm with fixed version
wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz
tar -zxvf CPAN-2.16.tar.gz
sudo mkdir /usr/share/perl5/CPAN/ -p
sudo cp ./CPAN-2.16/lib/CPAN/FirstTime.pm /usr/share/perl5/CPAN/FirstTime.pm
source
edited Sep 22 '18 at 11:59
Thomas
3,73661225
3,73661225
answered Sep 22 '18 at 11:36
Mohannd
63
63
add a comment |
add a comment |
On my shared hosting server, there is also a ~/.cpan/CPAN/MyConfig.pm file. Deleting the whole ~/.cpan folder did the job for me. Deleting /usr/share/perl5/CPAN/Config.pm requires root privilege so no can do for me.
This code works for me to reset and re-run cpan setup with no output (extracted from my sslcert cron script).
if [ -d ~/.cpan ]; then rm -fR ~/.cpan ; echo y | cpan > /dev/null 2>&1; fi
Same line also ran on my ubuntu desktop pc.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
On my shared hosting server, there is also a ~/.cpan/CPAN/MyConfig.pm file. Deleting the whole ~/.cpan folder did the job for me. Deleting /usr/share/perl5/CPAN/Config.pm requires root privilege so no can do for me.
This code works for me to reset and re-run cpan setup with no output (extracted from my sslcert cron script).
if [ -d ~/.cpan ]; then rm -fR ~/.cpan ; echo y | cpan > /dev/null 2>&1; fi
Same line also ran on my ubuntu desktop pc.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
On my shared hosting server, there is also a ~/.cpan/CPAN/MyConfig.pm file. Deleting the whole ~/.cpan folder did the job for me. Deleting /usr/share/perl5/CPAN/Config.pm requires root privilege so no can do for me.
This code works for me to reset and re-run cpan setup with no output (extracted from my sslcert cron script).
if [ -d ~/.cpan ]; then rm -fR ~/.cpan ; echo y | cpan > /dev/null 2>&1; fi
Same line also ran on my ubuntu desktop pc.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
On my shared hosting server, there is also a ~/.cpan/CPAN/MyConfig.pm file. Deleting the whole ~/.cpan folder did the job for me. Deleting /usr/share/perl5/CPAN/Config.pm requires root privilege so no can do for me.
This code works for me to reset and re-run cpan setup with no output (extracted from my sslcert cron script).
if [ -d ~/.cpan ]; then rm -fR ~/.cpan ; echo y | cpan > /dev/null 2>&1; fi
Same line also ran on my ubuntu desktop pc.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 31 mins ago
5p0ng3b0b
11
11
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5p0ng3b0b is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
delete /usr/share/perl5/CPAN/Config.pm and then run CPAN again
add a comment |
delete /usr/share/perl5/CPAN/Config.pm and then run CPAN again
add a comment |
delete /usr/share/perl5/CPAN/Config.pm and then run CPAN again
delete /usr/share/perl5/CPAN/Config.pm and then run CPAN again
edited Aug 1 '16 at 10:36
Tejas
1,79621839
1,79621839
answered Aug 1 '16 at 10:14
user182491
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f82676%2ffixing-cpan-by-resetting-it%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown