The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

imapsync on CentOS 6.6 with cPanel

Discussion in 'Workarounds and Optimization' started by technonotux, Feb 3, 2015.

  1. technonotux

    technonotux Registered

    Joined:
    Feb 3, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I am trying to install imapsync on cPanel server using the following procedure

    http://imapsync.lamiral.info/INSTALL

    On CentOS (thanks to Ralf Hauber)

    Install RPM Repository: Fedora Epel
    See perl-Data-Uniqid-0.12-2.el6.noarch.rpm CentOS 6 Download

    Commands to type:

    Code:
    wget [url]http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm[/url]
    rpm -Uvh epel-release*rpm
    
    yum install perl-Mail-IMAPClient # Mail::IMAPClient
    yum install "perl(Term::ReadKey)" # Term::ReadKey
    yum install "perl(Authen::NTLM)" # Authen::NTLM
    yum install perl-Data-Uniqid # Data::Uniqid
    yum install perl-File-Copy-Recursive # File::Copy::Recursive
    yum install perl-IO-Tee # IO::Tee
    yum install perl-Unicode-String # Unicode::String
    But if i install using the above procedure i get following error

    Code:
    root@vps [~/public_html]# yum install perl-Mail-IMAPClient
    Loaded plugins: fastestmirror, presto
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * base: mirror.acsnet.com <http://mirror.acsnet.com>
    * epel: ftp.osuosl.org <http://ftp.osuosl.org>
    * extras: mirror.nexcess.net <http://mirror.nexcess.net>
    * updates: mirrors.gigenet.com <http://mirrors.gigenet.com>
    *No package perl-Mail-IMAPClient available.*

    After searching i have found that perl* is excluded in yum configuration and also read somewere that remove exclusion will cause cPanel stop working to due change in paths of perl, so i would like to know how can get through it and get imapsync working on my VPS without disturbing cPanel configuration.

    I have done git clone of imapsync in following folder and tried below command it is giving error due to some perl modules are unable to locate

    Code:
    root@vps [~/public_html/imap/imapsync]# make install
    perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
    Can't locate IO/Tee.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at imapsync line 595.
    BEGIN failed--compilation aborted at imapsync line 595.
    
    Read the INSTALL file to solve Perl module dependencies!
    make: *** [testp] Error 1

    Steps to reproduce:
    login as root

    git clone https://github.com/imapsync/imapsync


    make install
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    You should be able to install all of those using 'perl -MCPAN' as described in the document. Although, I had trouble with IO::Socket::SSL and ended up doing a 'yum install perl-IO-Socket-SSL'

    As far as your yum.conf excluding PERL, what version of cPanel are you running on that server? Recent versions should have a completely different PERL installed for cPanel, thus allowing you to no longer exclude perl from being updated via yum and allowing you to install whatever you want in the OS' copy of PERL because it won't affect cPanel's PERL that it uses.

    As far as path changes, anything specific to cPanel would already have been taken care of by cPanel so that it uses the correct copy of PERL. I think the only thing that would be affected by removing perl* from the exclude line and keeping the OS' PERL up to date is any custom PERL scripts that you may have written. cPanel has documentation about this on their site somewhere, but I'm too lazy to go find it. I'm sure it's there though. For most people with cPanel servers, removing the perl* exclusion from yum.conf and updating the OS version of PERL [and installing new modules via yum or via perl -MCPAN] should not cause any issues.

    Mike
     
  3. technonotux

    technonotux Registered

    Joined:
    Feb 3, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    i have tried with perl -MCPAN but getting following errors

    Code:
    yogesh@vps [~/public_html/imap/imapsync]# make install
    perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
    Can't locate IO/Tee.pm in @INC (@INC contains: /home/yogesh/perl5/lib/perl5 /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at imapsync line 595.
    BEGIN failed--compilation aborted at imapsync line 595.
    
    Read the INSTALL file to solve Perl module dependencies!
    make: *** [testp] Error 1
    
    yogesh@vps [~/public_html/imap/imapsync]# perl -MCPAN -e "install Mail::IMAPClient"
    CPAN: Storable loaded ok (v2.45)
    CPAN: LWP::UserAgent loaded ok (v6.06)
    CPAN: Time::HiRes loaded ok (v1.9726)
    Warning: You are not allowed to write into directory "/home/.cpan/sources/authors".
        I'll continue, but if you encounter problems, they may be due
        to insufficient permissions.
    Fetching with LWP:
    [url]http://cpan.uchicago.edu/pub/CPAN//authors/01mailrc.txt.gz[/url]
    Can't write to '/home/.cpan/sources/authors/01mailrc.txt.gz.tmp18002-18002': Permission denied at /usr/local/lib/perl5/site_perl/5.8.8/LWP/Protocol.pm line 105. at /usr/local/lib/perl5/site_perl/5.8.8/LWP/UserAgent.pm line 916.
     
    #3 technonotux, Feb 3, 2015
    Last edited by a moderator: Feb 3, 2015
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    For any of the things mentioned above, you must be root:

    1. to run yum
    2. to run 'perl -MCPAN etc'
    3. to edit yum.conf

    Your profile indicates that you are a cPanel root administrator, which means that you indicated that you have root access. Why would you be attempting to do all of this as 'yogesh' if you have root privileges. su to root, sudo [if yogesh is set up with privileges], etc. Somehow do it as root.

    mike
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page