Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:20:56+00:00 2026-05-24T08:20:56+00:00

I want to apply a .patch file to one file. I placed both in

  • 0

I want to apply a .patch file to one file.
I placed both in the same folder and I tried this

trinity@Zion ~/Desktop $ patch -i lalala.patch 
patching file install.sub
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 1562.
1 out of 1 hunk FAILED -- saving rejects to file install.sub.rej

But as you see in the output, it failed. The content of install.sub.rej is basically all the code from lalala.patch
I tried similar commands but I got the same results. I guess I’m doing something wrong.

I know applying a patch is just 1 command but I’m so lost at this. If someone tells me the command or directly patches the file (and also tells me the command) thanks

original file
http://pastebin.com/raw.php?i=PKru8m5r
patch:
http://pastebin.com/raw.php?i=kkMUHtj8

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:20:57+00:00Added an answer on May 24, 2026 at 8:20 am

    Your patch command is fine. It is the patch file itself that gives the problem (at least for me (Kubuntu 11.04), as looking at the link you gave in the comment, all patch files contain the same error…?!)

    To solve the problem for me, find this line in the patch file:

    @@ -1562,6 +1562,8 @@ set_timezone() {
    

    and remove the set_timezone() { part and the error you describe is gone.

    This part is showing the function where the changes are made. When looking at the patches on the page you gave in your comment, it shows that all of them contain this extra information. As far as I know (but I am not a patch guru, so please correct me) is this not accepted by the default patch command.

    (Unfortunately enough, your patch still fails and the expected lines in the patch file compared to the original file do not match…)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to apply cycle to the div block with dynamic content. This content
I want to patch kohana with a file called request.patch, which I have in
I'm trying to apply a .patch file to a single .cpp file using git
I want to apply an XSLT Stylesheet to an XML Document using C# and
I want to apply a function to all columns in a matrix with MATLAB.
I want to apply right alignment on the last cell of every table row,
I want to apply NTFS-Search to our project. Our project have to find the
I want to apply some CSS to text that I can't get marked up
I want to apply a function f to a list of values, however function
In actionscript 3 I want to apply a special effect which will render my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.