If you see error -54 when syncing with your computer
If your content isn't syncing, consolidate your iTunes Library files and check for issues with third-party security software.
When trying to sync your iPhone, iPad or iPod touch with your computer, you may see an alert message that says:
“The iPhone [device name] cannot be synced. An unknown error occurred (-54).”
This can happen if a file on your computer or on your iOS or iPadOS device is locked. Click OK to continue the sync.
If your content isn't syncing, here's what to do:
Restart your computer and your iOS or iPadOS device.
If you're using iTunes on macOS Mojave or earlier or on a PC, make sure that you have the latest version of iTunes and the latest software updates for your device.
If you're still experiencing the issue, try following the steps below.
Consolidate the media files in your computer
The media files in the Music app or iTunes library may be stored in several locations. Try consolidating your files into one library.
Check for issues with third-party security software
Some third-party software, including security software, can interfere with the sync process between your computer and your device. Change your security software's setup and see if it fixes the issue.
Sync a small amount of content
Only sync a small amount of content at a time. Add more content until you see the error again. By doing this, you'll identify the content that's causing the issue.
Delete and re-download content
If the issue happens with content from the iTunes Store, delete and then re-download the apps and delete and then re-download music. Or download the apps and download music directly to your iPhone, iPad or iPod touch.
Delete and re-import content
If the content isn't from the iTunes Store, delete and then re-import it from the original source.
Remove PDF files from the sync process
This issue may happen when you try to transfer iTunes apps purchases or transfer iTunes music purchases from your iOS or iPadOS device to your computer. This may also happen when you try syncing with Apple Books, because it uses the same process. If so, there may be a problem with a PDF file saved to the Books app on your iOS device.
To fix the issue, use the Share option in the Books app on your device to email the PDF to yourself. This will save a copy of the PDF in your email account and will share it with the email address you've chosen, which can be accessed from your computer. Then remove the PDF file from your device.