如何告诉MacPorts我已经安装了某个库?
例如,我从头开始构建libcurl
以获得带有nghttp2
,openssl
和zlib
的http2协议。我将它们安装到/opt/local
- 与我系统上的所有MacPort库相同的位置。但是,Macports不承认它们已经安装。
如何告诉MacPorts这些已安装以及它们的版本?为什么?因为我正在尝试:
port install py35-pip
但会列出未安装libz
和openssl
。
答案 0 :(得分:2)
MacPorts不支持此功能,原因有多种:
/opt/local
中通常由MacPorts管理的文件。 MacPorts保留有关已安装文件的某些元数据(如所需的依赖关系),当您在/opt/local
中手动安装文件时,这些文件不再有效。/opt/local
中手动安装的二进制文件的配置。它可能是一个不再适用于某种依赖的版本,它可以在C ++代码的情况下针对不同的C ++标准库构建,或者由于许多其他原因而可能不兼容。由于MacPorts希望减少那些修改了某些端口的人的请求的支持负担,因此MacPorts的支持功能不是这样做的。但是,MacPorts已经支持使用nghttp2支持安装curl。请参阅port variants curl
的输出:
curl has the variants:
ares: Support resolving names asynchronously
darwinssl: Allow secure connections using GNU TLS
* conflicts with gnutls ssl wolfssl
gnutls: Allow secure connections using GNU TLS
* conflicts with darwinssl ssl wolfssl
gss: Support the Generic Security Service API
http2: Support HTTP/2 with nghttp2
idn: Enable support for internationalized domain names (IDN)
metalink: Support Metalink XML download description files
openldap: Support performing Lightweight Directory Access Protocol queries with OpenLDAP
sftp_scp: Support SFTP/SCP connections via libssh2
spnego: Enable SPNEGO authentication support
[+]ssl: Allow secure connections using OpenSSL
* conflicts with darwinssl gnutls wolfssl
universal: Build for multiple architectures
wolfssl: Allow secure connections using wolfSSL, formerly CyaSSL
* conflicts with darwinssl gnutls ssl
因此,在这种情况下,您可以使用curl +http2
安装sudo port install curl +http2
(如果您尚未安装)或使用sudo port upgrade --enforce-variants curl +http2
(如果已安装/usr/local
)实现同样的目标。
另请参阅var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"marginRight": 40,
"marginLeft": 200,
"autoMarginOffset": 20,
"mouseWheelZoomEnabled":true,
"dataDateFormat": "YYYY-MM-DD-JJ:NN:SS",
"valueAxes": [{
"id": "v1",
"axisAlpha": 1,
"position": "left",
"ignoreAxisWidth":true,
"precision": 2,
"axisColor": PosColor1,
}],
"balloon": {
"borderThickness": 1,
"shadowAlpha": 0
},
"graphs": [{
"valueAxis": "v1",
"id": "Graph1",
"lineColor": PosColor1,
"negativeLineColor": NegColor1,
//"bullet": "round",
//"bulletBorderThickness": 1,
//"hideBulletsCount": 30,
"title": ChartValue1,
"valueField": ChartValue1,
//"fillAlphas": 0,
"balloonText": "<span style='font-size:22;'>[[Heizkurve]]</span>",
"balloonFunction": function(item, graph) {
var result = graph.balloonText;
for (var key in item.dataContext) {
if (item.dataContext.hasOwnProperty(key) && !isNaN(item.dataContext[key])) {
var formatted = AmCharts.formatNumber(item.dataContext[key], {
precision: chart.precision,
decimalSeparator: chart.decimalSeparator,
thousandsSeparator: chart.thousandsSeparator
}, 2);
result = result.replace("[[" + key + "]]", formatted);
}
}
return result;
}
}],
"chartScrollbar": {
"graph": "g1",
"oppositeAxis":false,
"offset":10,
"scrollbarHeight": 40,
"backgroundAlpha": 0,
"selectedBackgroundAlpha": 0.1,
"selectedBackgroundColor": "#888888",
"graphFillAlpha": 0,
"graphLineAlpha": 0.5,
"selectedGraphFillAlpha": 0,
"selectedGraphLineAlpha": 1,
"autoGridCount":true,
"color":"#AAAAAA"
},
"chartCursor": {
//"pan": true,
//"valueLineEnabled": true,
//"valueLineBalloonEnabled": true,
"categoryBalloonDateFormat": "MMM DD JJ:NN",
"cursorAlpha":1,
"cursorColor":"#258cbb",
"limitToGraph":"g1",
"valueLineAlpha":0.2,
//"valueZoomable":true
},
"categoryField": "date",
"categoryAxis": {
"parseDates": true,
"minPeriod": "fff",
"dashLength": 1,
"minorGridEnabled": true
},
"export": {
"enabled": true
},
"dataLoader": {
"url": file,
"format": "csv",
"showCurtain": true,
"showErrors": true,
"async": true,
"reload": 0,
//"timestamp": true,
"delimiter": ",",
"useColumnNames": true
},
........;
chart.dataProvider = chartData;
chart.categoryField = "date";
chart.addListener("dataUpdated", zoomChart);
var categoryAxis = chart.categoryAxis;
categoryAxis.minPeriod="fff";
categoryAxis.parseDates = true;
和MacPorts。