2017-11-09 4 views
0

CircleCiを使用してテストを実行するプロジェクトがRuby on Railsです。過去に私はCircleCi 1.0を使っていましたが、今はCircleCi 2.0に移行しました。私はffmpegのインストールに問題があります。 CircleCi 2.0はUbuntu 14.04を使用しています。私はこのようなffmpegのインストール:CircleCi 2.0にffmpegをインストールできない

# ffmpeg installation 
sudo add-apt-repository ppa:mc3man/trusty-media -y 
sudo apt-get update 
sudo apt-get install ffmpeg 

を、私のcircle.yml設定ファイルは次のようになります。

version: 2 
environment: 
    TZ: "/usr/share/zoneinfo/America/Los_Angeles" 

jobs: 
    build: 
    parallelism: 2 
    working_directory: ~/circleci-survey-builder 
    docker: 
     - image: circleci/ruby:2.4.1-node 
     environment: 
      PGHOST: 127.0.0.1 
      PGUSER: ubuntu 
      RAILS_ENV: test 
     - image: circleci/postgres:9.6-alpine 
     environment: 
      POSTGRES_USER: ubuntu 
      POSTGRES_DB: circle_test 
      POSTGRES_PASSWORD: '' 
    steps: 
     - checkout 

     - run: 
      name: 'Install CircleCI dependencies' 
      command: bash deploy/circle-dependencies.sh 

     - type: cache-restore 
     key: dashboard-{{ checksum "Gemfile.lock" }} 

     - run: 
      name: 'Install gems' 
      command: bundle install --path vendor/bundle 

     - type: cache-save 
     key: dashboard-{{ checksum "Gemfile.lock" }} 
     paths: 
      - vendor/bundle 

     - run: 
      name: 'Install postgresql-client' 
      command: sudo apt install postgresql-client 

     - run: 
      name: 'Create database.yml' 
      command: mv config/database.ci.yml config/database.yml 

     - run: 
      name: Set up SurveyBuilder database 
      command: bundle exec rake db:structure:load --trace 

     - run: 
      name: 'Run tests' 
      command: | 
      bundle exec rspec spec 

それは私がCircleCi上に構築実行すると、エラーを次返します

#!/bin/bash -eo pipefail 
bash deploy/circle-dependencies.sh 

Fetching: bundler-1.16.0.gem (100%) 
Successfully installed bundler-1.16.0 
1 gem installed 
sudo: add-apt-repository: command not found 


Ign http://deb.debian.org jessie InRelease 

Get:1 http://deb.debian.org jessie-updates InRelease [145 kB] 

10% [1 InRelease 13.8 kB/145 kB 10%] [Waiting for headers] [Connecting to securHit http://deb.debian.org jessie Release.gpg 

Hit http://deb.debian.org jessie Release 

Get:2 http://deb.debian.org jessie-updates/main amd64 Packages [23.2 kB] 

Get:3 http://deb.debian.org jessie/main amd64 Packages [9063 kB] 

Get:4 http://security.debian.org jessie/updates InRelease [63.1 kB] 

Get:5 http://security.debian.org jessie/updates/main amd64 Packages [610 kB] 

100% [3 Packages 9063 kB]100% [3 Packages 9063 kB]Fetched 9904 kB in 1s (8178 kB/s) 

Reading package lists... 1% 
Reading package lists... 61% 
Reading package lists... Done 


Reading package lists... 1% 
Reading package lists... Done 


Building dependency tree... 0% 
Building dependency tree  


Reading state information... Done 

Package ffmpeg is not available, but is referred to by another package. 
This may mean that the package is missing, has been obsoleted, or 
is only available from another source 

E: Package 'ffmpeg' has no installation candidate 
Exited with code 100 

どのようにすることができますそれを修正する?

+0

"sudo:add-apt-repository:command not found"のようなエラーが表示されるようです。 特別なパッケージ 'apt-get install software-properties-common'をインストールしてみてください – TheUnknown

+0

私はそれを私のビルドに追加しましたが、問題は変わりません。 –

+0

ああ、それは悪いです。解決策のカップルが見つかりました、ちょうど以下のリンクを確認してください。 https://superuser.com/questions/286675/how-to-install-ffmpeg-on-debian。 – TheUnknown

答えて

2

システムはDebian 8.0(jessie)で、Ubuntu 14.04ではなくなっています。あなたはバックポートを有効にする必要があります

sudo sh -c 'echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list' 
apt update 
apt install -y ffmpeg 
+0

これは次のようなエラーを返します: '' 'ffmpegは利用できませんが、別のパッケージで参照されます。 これはパッケージが欠落していることを意味するかもしれない、廃止、または が別のソースから Eのみ利用可能ですされています。パッケージ「ffmpegのは、」コード100''' –

+0

で終了した全くインストール候補 を持っていません。また、私は追加のバックポートが失敗したことを考えます: '' 'deploy/circle- dependencies.sh:行5:/etc/apt/sources.list:アクセスが拒否されました' ' 私はsudoで試しましたが、結果は同じです。 –

+0

円ciがレポを追加できるかどうかを確認する必要があります –

関連する問題