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.

pkgacct

Discussion in 'General Discussion' started by oozetime, Aug 22, 2014.

  1. oozetime

    oozetime Member

    Joined:
    Aug 22, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm having trouble to migrate a client, it certainly damaged the pkgacct file.

    This errros returning the following:

    On cPanel:

    Account “fantasyb”: The remote execution of “pkgacct” was not sucessful, or the requested account, “fantasyb” was not found on the server: “208.115.206.3”.

    On Command Line:

    root@host [/home]# /scripts/pkgacct fantasyb
    -bash: /scripts/pkgacct: /usr/local/cpanel/3rdparty/bin/perl^M: bad interpreter: No such file or directory



    How to solve?
     
  2. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hello,

    The error here states the problem:
    -bash: /scripts/pkgacct: /usr/local/cpanel/3rdparty/bin/perl^M: bad interpreter: No such file or directory

    If you notice, there is a '^M' character at the end of the interpreter in /scripts/pkgacct. This seems that it may have been opened in a Windows Editor, notepad, or something like this. You will need to open / edit '/scripts/pkgacct', and remove the '^M' from the first line in the file.
     
  3. oozetime

    oozetime Member

    Joined:
    Aug 22, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    On file:

    #!/usr/local/cpanel/3rdparty/bin/perl
    # cpanel - scripts/pkgacct Copyright(c) 2014 cPanel, Inc.
    # All rights Reserved.
    # copyright@cpanel.net cPanel, Inc.
    # This code is subject to the cPanel license. Unauthorized copying is prohibited


    Searching ^M in pkgacct file

    Result: [ "^M" not found ]
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you verify if you did in-fact manually edit that file in a Windows editor such as notepad? How are you checking the file for the '^M' character (e.g. through a Windows editor again or through vi)? Sometimes the "dos2unix" utility will help. EX:

    Code:
    yum install dos2unix
    dos2unix /path/to/file
    Thank you.
     
  5. oozetime

    oozetime Member

    Joined:
    Aug 22, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    See: - URL removed -
     
    #5 oozetime, Aug 22, 2014
    Last edited by a moderator: Aug 22, 2014
  6. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Friendly Moderator Note

    Please avoid linking to other sites to provide screenshots. If a screenshot is necessary, please add it directly to your post as an attachment. Generally, a screenshot is only necessary if graphics are important to the problem. If shell output is what is being discussed, there is a better way to share it:

    In most cases, when handling shell output, it is much better to copy and paste the text, rather than making a picture of text. If you are using PuTTY, all you need to do is click and drag to highlight the text, and the text is automatically copied. You can then paste the text into the message. You can then wrap the output in CODE tags, which will display the text in a fixed-width font, just like on your terminal.

    The advantage to this is that the text is displayed in a readable size, no matter what browser or screen size is in use, and other users can copy and paste relevant portions of the output. That is not possible when a picture of text, instead of the actual text, is presented.
     
  7. oozetime

    oozetime Member

    Joined:
    Aug 22, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Sorry, I had sent a copy of the file, pastebin is a site code and not images.

    But I solved this problem, thx!
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I am happy to see you were able to resolve the issue. Would you mind sharing the solution?

    Thank you.
     
  9. oozetime

    oozetime Member

    Joined:
    Aug 22, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Of course not! What did I do? Entered into another WHM, I copied the code and pasted using nano.

    It would be interesting that you make available links to when these things happen.

    Imagine if I dont have another whm available?
     
  10. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Yes, I understand that pastebin is for code, not images, but I wanted to mention it not only for your reference but for other users who may view this thread in the future. I am glad to see that you solved the problem.
     
Loading...

Share This Page