3

そのため、プライベート リポジトリで作成した Debian パッケージがあり、特定のバージョンをインストールしたいと考えています。

パッケージには共通の lib 依存関係があり、そのパッケージの一致するバージョンをインストールしたいと考えています。apt-getパッケージが依存しているバージョンではなく、依存関係の最新バージョンをインストールすることを主張しています。

ここでコマンドの出力を確認できます。

cmcc@cmcc-VirtualBox:~/Desktop/repo$ sudo apt-get install my_program=57.0.93
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 my_program : Depends: my_program-common (= 57.0.93) but 57.3.102 is to be installed
E: Unable to correct problems, you have held broken packages.
4

1 に答える 1

8

バージョン管理された共通パッケージもインストールするだけです。

aptitude install my_program=57.0.93 my_program-common=57.0.93

注: 一般aptitudeに、依存関係を解決するには、apt-get. 使用方法は非常に似ているため、簡単に切り替えることができます。

アップデート

インタラクティブなプロセスを受け入れることができる場合、おそらく最も簡単な方法はaptitude、いくつかの提案をして、パッケージをダウングレードするものを選択することです。例えば:

# aptitude install my_program=57.0.93-1
The following packages will be DOWNGRADED:
  my_program{b} 
0 packages upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded.
Need to get 180 kB of archives. After unpacking 12.3 kB will be used.
The following packages have unmet dependencies:
 my_program : Depends: my_program-common (= 57.0.93-1) but 57.3.102-1 is to be installed
The following actions will resolve these dependencies:

     Remove the following packages:              
1)     my_program-common                                  
2)     my_program

     Leave the following dependencies unresolved:
3)     my_program recommends my_program-foo      


Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Downgrade the following packages:
1)     my_program-common [57.3.102-1 (now, unstable) -> 57.0.93-1 (stable)]

Accept this solution? [Y/n/q/?] Y

パッケージバージョンに関する注意

あなたのパッケージには のようなバージョンがあるよう57.0.93です。このようなバージョン管理スキームは、non-nativeパッケージでは明示的に禁止されています。たとえば、DebianMentorsFAQを確認してください。

パッケージの作成方法により、常に「1」であっても、57.3.102-1(つまり)のようなバージョンを作成する必要があります。<upstreamversion>-<pkgversion><pkgversion>

于 2013-08-04T14:21:31.733 に答える