{"id":4160,"date":"2019-04-05T14:46:39","date_gmt":"2019-04-05T09:16:39","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4160"},"modified":"2026-10-15T12:09:11","modified_gmt":"2026-10-15T06:39:11","slug":"dpkg-error-processing-package-javascript-common","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/dpkg-error-processing-package-javascript-common\/","title":{"rendered":"dpkg: error processing package javascript-common"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Post Date: April 5, 2019 <br>Last Updated: October 15, 2026<\/h3>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to fix the error processing package javascript-common on Ubuntu. It typically appears in the middle of a larger install, such as setting up VestaCP, and stops everything else queued in that run:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Setting up javascript-common (11) ...\ndpkg: error processing package javascript-common (--configure):\n subprocess installed post-installation script returned error exit status 1\nErrors were encountered while processing:\n javascript-common\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The error processing package javascript-common message means the package&#8217;s setup script failed, so <code>dpkg<\/code> left it half-configured. The quick fix is to purge the package, but you also need to finish the interrupted installation afterward, which the original guide skipped.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Ubuntu 18.04, where this was first seen, reached end of standard support on May 31, 2023. The fix below works on any Ubuntu or Debian release, and a new server should use a supported release. Also, VestaCP&#8217;s development has largely stalled (its last tagged release was in 2021). <a href=\"https:\/\/www.hestiacp.com\/\" target=\"_blank\" rel=\"noopener\">HestiaCP<\/a>, a fork started in 2019, is the actively maintained continuation, so consider it for new installs.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you fix the error processing package javascript-common, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root or sudo access to the server<\/li>\n\n\n\n<li>The terminal output from the failed install, if you still have it<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>apt<\/code> installs packages in two stages. <code>dpkg<\/code> first unpacks each package, then configures it by running its post-installation script<\/li>\n\n\n\n<li>The script for <a href=\"https:\/\/packages.ubuntu.com\/javascript-common\" target=\"_blank\" rel=\"noopener\">javascript-common<\/a> sets up an Apache configuration snippet, so it depends on Apache being in a working state at that moment<\/li>\n\n\n\n<li>If the script exits with an error, <code>dpkg<\/code> marks the package half-configured and <code>apt<\/code> aborts, which blocks every other package queued in the same run<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The diagram below shows how the error processing package javascript-common stops an install:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow-1024x683.png\" alt=\"\" class=\"wp-image-12321\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow-1024x683.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow-300x200.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow-768x512.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow-272x182.png 272w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/javascript-common-Installation-Failure-Flow.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Fix the Error Processing Package javascript-common<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Read the Full Error Output<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dpkg --configure -a\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This reruns the failed configuration and prints the lines just above the &#8220;dpkg: error processing&#8221; message. Those lines often contain the real reason the script failed, usually an Apache error, and they explain why the error processing package javascript-common appeared.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Check Apache&#8217;s Health<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apache2ctl configtest\nsudo systemctl status apache2\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>configtest<\/code> reports a problem, or Apache can&#8217;t start, fix that first. A half-finished VestaCP install can leave Apache misconfigured or unable to start, since the installer reconfigures both Apache and Nginx. Once Apache is healthy, rerun <code>sudo dpkg --configure -a<\/code>. The package may configure itself without any removal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Purge javascript-common<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If Apache isn&#8217;t the problem, or you just want to get past it, remove the package completely:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get purge javascript-common\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is the fix that clears the error processing package javascript-common in most cases. The original guide used <code>apt-get --purge remove javascript-common<\/code>, which does the same thing. Purging deletes the package&#8217;s configuration files as well as the program, which is why it clears a half-configured package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>javascript-common<\/code> is a small, optional package that mainly provides a <code>\/javascript<\/code> alias for Apache. If <code>apt<\/code> lists other packages that will be removed with it, read the list carefully before you confirm.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Finish the Interrupted Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Removing the package fixes only the failing piece. The install that was interrupted still needs completing:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dpkg --configure -a\nsudo apt-get install -f\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>dpkg --configure -a<\/code> finishes configuring any package left half-configured. <code>apt-get install -f<\/code> repairs broken dependencies and completes pending installs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Verify and Re-run the Installer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm nothing is still broken:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dpkg --audit\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">No output means no packages are in a broken state. Then re-run your installer.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">VestaCP&#8217;s installer expects a clean system, so it may refuse to run if parts of the stack are already installed. If it does, the cleanest path is to start again from a fresh OS image rather than layering a second install on a half-finished one.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The error processing package javascript-common comes down to a failing post-installation script, usually tied to Apache&#8217;s state. Check Apache first, purge the package if needed, and then finish the interrupted installation with <code>dpkg --configure -a<\/code> and <code>apt-get install -f<\/code>. Skipping that last step leaves the rest of the original install unfinished.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why does the error processing package javascript-common stop the whole installation?<\/strong> When a package&#8217;s setup script fails, <code>dpkg<\/code> marks it half-configured and <code>apt<\/code> aborts the run, so every other package queued after it is left unfinished too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Is it safe to purge javascript-common?<\/strong> Generally yes. It&#8217;s a small, optional package. Just read the list <code>apt<\/code> shows before confirming, in case something else depends on it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Will the error processing package javascript-common come back?<\/strong> If the cause is an unhealthy Apache, other Apache-related packages can fail the same way until Apache is fixed. Run <code>apache2ctl configtest<\/code> and resolve any errors it reports.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does this fix only apply to VestaCP?<\/strong> No. Any install that pulls in <code>javascript-common<\/code> as a dependency can hit this error, and the same steps apply.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/generate-pdf-using-javascript\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Generate PDF Files Using JavaScript<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/understanding-javascript-cookies\/\" target=\"_blank\" rel=\"noreferrer noopener\">Understanding Browser Cookies in JavaScript<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to Our Technology Experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Running into package errors or planning a control panel migration? Our team can help with Linux server administration, control panel setup and migration, and ongoing support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/contact\">Connect with our technology experts.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: April 5, 2019 Last Updated: October 15, 2026 Introduction This guide explains how to fix the error processing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[606,274,344],"class_list":["post-4160","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-dpkg","tag-ubuntu","tag-vestacp","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-156","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4160"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4160\/revisions"}],"predecessor-version":[{"id":12322,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4160\/revisions\/12322"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}