我无法在debian 8上安装mongodb。
我使用docs.mongodb
上的说明当我运行sudo apt-get install -y mongodb-org
时,收到错误:
sudo apt-get install -y mongodb-org
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:
mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
Depends: mongodb-org-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我的source.list
sudo cat /etc/apt/sources.list.d/*
deb http://fastpanel.fastvps.ru/fastpanel wheezy main
deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main
deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx
答案 0 :(得分:0)
尝试使用class Score: Object, Decoder {
dynamic var id: String = ""
dynamic var title: String = ""
dynamic var body: String = ""
dynamic var cardOrder: Int = 0
dynamic var video: Video? = nil
override static func primaryKey() -> String? {
return "id"
}
typealias T = Score
// MARK: Decoder method
static func decode(json: JSON) -> Score {
let id = json["_id"].stringValue
let title = json["title"].stringValue
let body = json["data"].stringValue
let cardOrder = json["card_order"].intValue
var video: Video?
if (json["video"].exists()) {
video = Video.decode(json: json["video"])
}
let score = Score()
score.id = id
score.title = title
score.body = body
score.video = video
score.cardOrder = cardOrder
return score
}
}
选项。
--fix-missing
答案 1 :(得分:0)
你有一个混合的sources.list jessie和wheezy,只保留mongodb-org-3.4.list
下的/etc/apt/sources.list.d/
以下网址:
deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main
另外,请验证您的/etc/apt/sources.list
您应该只有与debian jessie兼容的网址。
然后运行:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install mongodb-org