ArjenSchwarz / wercker-step-hugo-build

Wercker Step for building Hugo sites
45 stars 19 forks source link

List directory /var/lib/apt/lists/partial is missing (Permission denied) #19

Closed yxian29 closed 8 years ago

yxian29 commented 8 years ago

Hi,

I have an issue while running wercker builder with this wercker.yml

box: wercker/default
build:
  steps:
    - arjen/hugo-build:
        version: "0.14"
        theme: hugo-redlounge
        flags: --buildDrafts=true

and I got the following errors during arjen/hugo-build steps,

cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/arjen/hugo-build/1.8.0"
$ export WERCKER_STEP_ID="6881ebb2-71dd-48dc-a6d5-cc8266b06e33"
$ export WERCKER_STEP_NAME="hugo-build"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_HUGO_BUILD_VERSION="0.14"
$ export WERCKER_HUGO_BUILD_THEME="hugo-redlounge"
$ export WERCKER_HUGO_BUILD_FLAGS="--buildDrafts=true"
$ export WERCKER_HUGO_BUILD_DISABLE_PYGMENTS="false"
$ export WERCKER_HUGO_BUILD_FORCE_INSTALL="false"
$ export WERCKER_HUGO_BUILD_PROD_BRANCHES=""
$ export WERCKER_HUGO_BUILD_DEV_BRANCHES=""
$ export WERCKER_HUGO_BUILD_DEV_FLAGS=""
$ export WERCKER_HUGO_BUILD_CONFIG=""
$ source "$WERCKER_STEP_ROOT/run.sh"
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Any idea how I can solve the issue?

Thanks in advance.

sdebruyn commented 8 years ago

I'd recommend switching to the new Wercker stack and using box: debian. It seems like your current user is not a root user which is required for this step.

yxian29 commented 8 years ago

Thanks Samuel. Switching to box: debian works fine for me