熱搜:win11繞過硬件限制安裝 一鍵重裝Win10系統(tǒng) 最干凈的u盤啟動(dòng)盤 真正純凈版的win7系統(tǒng)
時(shí)間:2015-02-06 17:57:36 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20150206/37459.html 手機(jī)查看 評(píng)論 反饋
Ubuntu系統(tǒng)操作中,Pacman是一款軟件包管理器,能夠?qū)俜降腁rch庫(kù)和自己創(chuàng)建的軟件包進(jìn)行管理,但是有時(shí)在安裝Pacman的時(shí)候會(huì)出錯(cuò),下面小編就給大家介紹下Ubuntu如何安裝Pacman。
1,wget ‘ftp://ftp.archlinux.org/other/pacman/pacman-4.1.2.tar.gz’下載軟件包
2,tar xvf pacman-4.1.2.tar.gz,解壓縮軟件
3,cd pacman-4.1.2/,進(jìn)入代碼,執(zhí)行。/configure,提示沒有l(wèi)ibarchive
4,執(zhí)行sudo apt-get libarchive-dev安裝libarchive
5,再次執(zhí)行。/configure,通過
6,執(zhí)行make,出錯(cuò)
-------------------------------------------------------------------------------
CC libalpm_la-be_sync.lo
be_sync.c: In function ‘_alpm_validate_filename’:
be_sync.c:499: error: ‘PATH_MAX’ undeclared (first use in this function)
be_sync.c:499: error: (Each undeclared identifier is reported only once
be_sync.c:499: error: for each function it appears in.)
make[3]: *** [libalpm_la-be_sync.lo] 錯(cuò)誤 1
make[2]: *** [all-recursive] 錯(cuò)誤 1
make[1]: *** [all-recursive] 錯(cuò)誤 1
make: *** [all] 錯(cuò)誤 2
--------------------------------------------------------------------------------
7,gedit lib/libalpm/be_sync.c,代碼文件,找到代碼
-------------------------------------------------------------------------------
static int _alpm_validate_filename(alpm_db_t *db, const char *pkgname,
const char *filename)
{
size_t len = strlen(filename);
if(filename[0] == ‘。’) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is illegal\n”), db-》treename, pkgname);
return -1;
} else if(memchr(filename, ‘/’, len) != NULL) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is illegal\n”), db-》treename, pkgname);
return -1;
}
else if(len 》 PATH_MAX) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is too long\n”), db-》treename, pkgname);
return -1;
}
return 0;
}
-------------------------------------------------------------------------------
修改如下
-------------------------------------------------------------------------------
static int _alpm_validate_filename(alpm_db_t *db, const char *pkgname,
const char *filename)
{
size_t len = strlen(filename);
if(filename[0] == ‘。’) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is illegal\n”), db-》treename, pkgname);
return -1;
} else if(memchr(filename, ‘/’, len) != NULL) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is illegal\n”), db-》treename, pkgname);
return -1;
}
/*
else if(len 》 PATH_MAX) {
errno = EINVAL;
_alpm_log(db-》handle, ALPM_LOG_ERROR, _(“%s database is inconsistent: filename ”
“of package %s is too long\n”), db-》treename, pkgname);
return -1;
}
*/
return 0;
}
-------------------------------------------------------------------------------
保存,退出
8,執(zhí)行make&& make install,等待安裝完成。
上面就是Ubuntu安裝Pacman的方法介紹了,通常安裝的時(shí)候會(huì)在執(zhí)行make出錯(cuò),出錯(cuò)后按照本文介紹的代碼進(jìn)行安裝,最后再執(zhí)行make&& make install完成安裝。
發(fā)表評(píng)論
共0條
評(píng)論就這些咯,讓大家也知道你的獨(dú)特見解
立即評(píng)論以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)