我试图安装PHPMYADMIN并收到错误
E:子流程/ urs / bin / dpkg返回错误代码(1)
我尝试重新安装它,但它只是给我这个错误 不确定如何解决它
任何帮助都会被批评
$(document).ready(function() {
var emailPattern = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b/;
// move the focus to the first text box
$("#arrival_date").focus();
//for tabs
$("#tabs").tabs();
// the handler for the submit event of the form
// executed when the submit button is clicked
$("#reservation_form").submit(
function(event) {
var isValid = true;
// validate the requested arrival date
var arrivalDate = $("#arrival_date").val().trim();
if (arrivalDate == "") {
$("#arrival_date").next().text("This field is required.");
isValid = false;
} else {
$("#arrival_date").next().text("");
}
$("#arrival_date").val(arrivalDate);
// validate the number of nights
var nights = $("#nights").val().trim();
if (nights == "") {
$("#nights").next().text("This field is required.");
isValid = false;
} else if (isNaN($("#nights").val())) {
$("#nights").next().text("This field must be numeric.");
isValid = false;
} else {
$("#nights").next().text("");
}
$("#nights").val(nights);
// validate the name entry
var name = $("#name").val().trim();
if (name == "") {
$("#name").next().text("This field is required.");
isValid = false;
}
else {
$("#name").val(name);
$("#name").next().text("");
}
$("#name").val(name);
// validate the email entry with a regular expression
var email = $("#email").val();
if (email == "") {
$("#email").next().text("This field is required.");
isValid = false;
} else if ( !emailPattern.test(email) ) {
$("#email").next().text("Must be a valid email address.");
isValid = false;
} else {
$("#email").next().text("");
}
$("#email").val(email);
// validate the phone number
var phone = $("#phone").val().trim();
if (phone == "") {
$("#phone").next().text("This field is required.");
isValid = false;
} else {
$("#phone").next().text("");
}
$("#phone").val(phone);
// prevent the submission of the form if any entries are invalid
if (isValid == false) {
event.preventDefault();
}
} // end function
); // end submit
}); // end ready
答案 0 :(得分:0)
虽然从Ubuntu的存储库安装phpMyAdmin很容易,但它不是最新版本。您可以从https://www.phpmyadmin.net/手动安装。
安装phpMyAdmin:
sudo apt-get update
sudo apt-get install unzip
cd /var/www/html
wget https://files.phpmyadmin.net/phpMyAdmin/4.8.0/phpMyAdmin-4.8.0-all-languages.zip
unzip phpMyAdmin-4.8.0-all-languages.zip
rm phpMyAdmin-4.8.0-all-languages.zip
一些解释:
sudo apt-get update
- 更新存储库列表
sudo apt-get install unzip
- 安装解压缩phpMyAdmin存档所需的解压缩(如果尚未安装)
cd /var/www/html
- 进入您要安装的目录(必须公开)
wget https://files.phpmyadmin.net/...languages.zip
- 下载phpMyAdmin存档
unzip phpMyAdmin-4.8.0-all-languages.zip
- 解压档案
rm phpMyAdmin-4.8.0-all-languages.zip
- 删除存档,因为它不再需要
如何访问phpMyAdmin:
现在您可以访问phpMyAdmin http://www.your_domain.tld/phpMyAdmin-4.8.0-all-languages/
或ip地址http://ip_address/phpMyAdmin-4.8.0-all-languages/