AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-223332

Amul Bhatia's questions

Martin Hope
Amul Bhatia
Asked: 2021-05-29 19:23:43 +0800 CST

head 和 tail 命令一起输出到文件中

  • 0

假设我的文件file1.txt名为1,2,3.. upto 100 linewise.

$> head -n 5 file1.txt //will display first 5 lines i.e. 1,2,3,4,5
$> tail -n 5 file1.txt // will display last 5 lines i.e. 96,97,98,99,100

我想在 1 个命令中将内容显示为前 5 行和后 5 行,

$> head tail -n 5 file1.txt // Something like this 1,2,3,4,5   96,97,98,99,100 (both together)

我怎样才能做到这一点?

command-line
  • 2 个回答
  • 282 Views
Martin Hope
Amul Bhatia
Asked: 2021-03-09 19:58:43 +0800 CST

不允许使用 GRANT 创建用户

  • 2

我试图使用链接在 ubuntu 上安装 wordpress 并点击 https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-database

当我运行这个命令时,我得到了错误-

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
    -> ON wordpress.*
    -> TO wordpress@localhost
    -> IDENTIFIED BY 'root';


ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'root'' at line 1

wordpress@localhost我通过更改to尝试了几乎所有语法'wordpress'@'localhost'

'root'我尝试在in上删除和添加 APOSTROPHE IDENTIFIED BY 'root',

然后在搜索之后我也尝试了这个命令 - GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'root'并得到了

错误 -ERROR 1410 (42000): You are not allowed to create a user with GRANT

没有发现对我有用。请帮助我在哪里做错了。谢谢

PS 数据库已经存在 -

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| wordpress          |
+--------------------+
5 rows in set (0.01 sec)
mysql
  • 1 个回答
  • 45149 Views
Martin Hope
Amul Bhatia
Asked: 2018-09-16 17:35:52 +0800 CST

减少 Java 堆内存

  • 1

我错误地增加了我的 android studio 的堆大小,当我启动 android studio 时,我收到了这个错误

Invalid maximum heap size: -Xmx4096m # <------ increase this to most of your RAM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

我知道这与 Java 堆内存有关,我已经重新安装了 Android Studio,但得到了同样的错误。

请告诉我在哪里可以更改 Java 的堆大小?我正在使用 ubuntu18

android java android-studio
  • 1 个回答
  • 685 Views
Martin Hope
Amul Bhatia
Asked: 2018-08-27 06:22:18 +0800 CST

分销升级挂起

  • 0

我已经运行 Ubuntu 发行版 16.04 LTS 并尝试升级到 18.04 LTS,它在以下位置受到打击

在此处输入图像描述

我没有尝试任何可能损坏升级的解决方案。

怎么解决??我需要下载或重新安装所有内容吗?

(我已经在我的系统上安装了 Windows 8)请帮助

16.04
  • 1 个回答
  • 61 Views
Martin Hope
Amul Bhatia
Asked: 2016-03-12 23:38:54 +0800 CST

无法在 Ubuntu 中安装虚拟机

  • 2

我遵循了这个 Ask Ubuntu guide ,我从这个链接手动下载了虚拟盒并尝试安装:

$ dpkg -i virtualbox-5.0_5.0.16-105871~Ubuntu~trusty_amd64.deb 

但没有成功,我得到了这个错误:

    dpkg: error processing package virtualbox-5.0 (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (219-7ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) ...
Processing triggers for shared-mime-info (1.3-1) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for gnome-menus (3.10.1-0ubuntu5) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Errors were encountered while processing:
 virtualbox-5.0

我在应用程序中获得了 Oracle 虚拟框图标,当我单击时,它没有打开,因此 geny motion 无法识别任何虚拟框,因此它也无法启动。

请帮我。我已经用过

sudo apt-get remove --purge virtualbox*
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian trusty contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update && sudo apt-get install virtualbox-5.0

没有成功。我究竟做错了什么?

  • Ubuntu 15.04
  • Java版javac 1.8.0_74
apt
  • 3 个回答
  • 2463 Views
Martin Hope
Amul Bhatia
Asked: 2014-08-24 03:25:05 +0800 CST

无法安装

  • -1

我无法在 ubuntu 中安装任何软件(来自软件中心),安装失败后,当我检查我的详细信息时,出现以下错误..请帮助我安装它,

installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 install-info
Error in function: 
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
 subprocess installed post-installation script returned error exit status 127

我有以下 /etc/environment 的输出,那里已经安装了 java_home。

的输出cat /etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/u‌​sr/local/games" 
JAVA_HOME =/usr/lib/jvm/jdk1.7.0/bin 

我已经更新了语言支持并收到以下错误

amulbhatia@Nadar:~$ sudo apt-get install language-pack-en
[sudo] password for amulbhatia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  kde-l10n-engb
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  language-pack-en-base
The following packages will be upgraded:
  language-pack-en language-pack-en-base
2 upgraded, 0 newly installed, 0 to remove and 321 not upgraded.
1 not fully installed or removed.
Need to get 0 B/459 kB of archives.
After this operation, 1,421 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
 subprocess installed post-installation script returned error exit status 127
E: Sub-process /usr/bin/dpkg returned an error code (1)

提前谢谢朋友们,

software-installation
  • 2 个回答
  • 2962 Views
Martin Hope
Amul Bhatia
Asked: 2014-07-07 03:07:01 +0800 CST

Android Studio 不工作 - tools.jar 类路径错误

  • 4

我刚刚下载了 Android Studio,当我尝试运行./studio.sh它时出现错误

'tools.jar' seems to be not in Android Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE

我检查过/usr/lib/jvm/java-1.7.0-openjdk-amd64这个文件夹java在那里,我已经设置了环境变量

/etc/environment

作为

JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-amd64/"

但是仍然出现同样的错误,请帮帮我,

保存此文件后,如果我检查

echo $JAVA_HOME

什么都没有,当我尝试时

source /etc/environment

它来了

JAVA_HOME: command not found

我该如何进行?

java
  • 4 个回答
  • 28924 Views
Martin Hope
Amul Bhatia
Asked: 2014-06-30 03:03:14 +0800 CST

致命错误:gtk/gtk.h:没有那个文件或目录

  • 0

我知道这个问题已经回答了好几次,我已经尝试了每一个,但仍然找不到确切的解决方案。我开始使用 Glade 用户界面学习 GTK + 3.0。我知道 Glade 将为设计生成 XML,并且可以在我们的 c/cpp 程序中使用相同的 XML。但是要执行该程序,必须安装所有库或者必须将路径设置为 IDE 中的库。每当我尝试构建程序时,我都会使用 Anjuta IDE 来开发该程序,但会出现以下错误。

gtk/gtk.h: No such file or directory

在此处输入图像描述

程序代码

#include <gtk/gtk.h>!
#include <glade/glade.h>

void
ok_button_clicked (GtkWidget *widget, gpointer user_data)
{
  printf ("Thanks for trying out my program.\n");
  gtk_main_quit ();
}

int main (int argc, char *argv[])
{
  GladeXML  *main_window;
  GtkWidget *widget;

  gtk_init (&argc, &argv);

  /* load the interface */
  main_window = glade_xml_new ("example-1.glade", NULL, NULL);

  /* connect the signals in the interface */

  /* Have the ok button call the ok_button_clicked callback */
  widget = glade_xml_get_widget (main_window, "OKButton");
  g_signal_connect (G_OBJECT (widget), "clicked",
                    G_CALLBACK (ok_button_clicked),
                    NULL);

  /* Have the delete event (window close) end the program */
  widget = glade_xml_get_widget (main_window, "MainWindow");
  g_signal_connect (G_OBJECT (widget), "delete_event",
                    G_CALLBACK (gtk_main_quit), NULL);

  /* start the event loop */
  gtk_main ();

  return 0;
}

每当我尝试添加 Lib 或 External Lib 时,我都无法添加gtk/gtk.h文件,相同的文件已经存在/usr/include/gtk-3.0/gtk/gtk.h并且当我尝试在libanjuta相同的代码中复制相同的文件时仍然出现相同的错误,任何帮助将不胜感激朋友,我很难执行程序..

感谢 Amul Bhatia

anjuta
  • 1 个回答
  • 5139 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve