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-747939

GD- Ganesh Deshmukh's questions

Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-12-24 03:13:42 +0800 CST

如何在 Sublime Text 3 中更改 Python 版本?

  • 3

我在 Ubuntu 中使用 Sublime Text 3。默认的 Python 是python2Sublime 在我使用Ctrl+构建程序时使用B的。

我正在尝试运行代码,

print(f"Player {row[0]} Vertically =")

但它给出了如下错误,因为代码是使用默认 Python 运行的

File "/home/gd/Desktop/python/python-revision/pp_13_iterators_iterables.py", line 41
  print(f"Player {row[0]} Vertically =")
                                      ^
SyntaxError: invalid syntax
[Finished in 0.0s with exit code 1]
[shell_cmd: python -u "/home/gd/Desktop/python/python-revision/pp_13_iterators_iterables.py"]
[dir: /home/gd/Desktop/python/python-revision]

但是,当我从终端运行相同的程序时,使用python3它可以按预期工作。

$ python3 pp_13_iterators_iterables.py
[1, 2, 1]
[2, 0, 1]
[1, 2, 1]
Vertically
Player 1 Vertically =

如何将 Sublime Text 的默认构建环境更改为 Python 3 并使用快捷方式作为Ctrl+构建它B?

我尝试使用别名作为

alias python="/usr/bin/python3.6"

但它不起作用,并给出了与以前相同的错误。

python3 sublime-text
  • 2 个回答
  • 15880 Views
Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-08-11 20:40:12 +0800 CST

如何将脚本命令输出转换为纯文本

  • 1

我正在使用script-command将终端的输出保存到文件中。

但是,它提供了一些额外的字符,如square-like字符和其他文本加密字符。

man script命令告诉,通过使用-q标志/选项,它给出了相当多的输出,而不会将开始和完成消息写入标准输出,但它不会删除额外的字符。

这里

我怎样才能得到以下信息:

1)使输出文件与终端输出完全相同,删除多余的字符。

2)在生成的文件中,由于纯文本 - 没有颜色(与终端不同),我无法直接弄清楚input commands,因为我输入的输出和命令出现相同的字体,

我可以将命令设置为比其他输出粗体或易于识别吗?

scripts command-line gnome-terminal bash console
  • 1 个回答
  • 6012 Views
Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-06-13 19:32:18 +0800 CST

在 Ubuntu 18.04、戴尔(英特尔显卡驱动程序)上运行缓慢的图形,同时观看 Youtube 视频

  • 1

在观看视频(Youtube)时,它会冻结大约 5-10 秒,然后继续,但音频会继续运行。我尝试了不同的浏览器,但没有解决方案。

graphics intel-graphics gpu-driver 18.04
  • 2 个回答
  • 3294 Views
Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-05-27 06:11:14 +0800 CST

如何在 Ubuntu 18.04 上为 react-native 安装 watchman?make 命令出错

  • 14

我已阅读此解决方案 。

我希望 nodeman 作为 react-native 的依赖项

命令没有错误 ./configure,它作为给定的解决方案工作正常

gd@gd10:/tmp$ git clone https://github.com/facebook/watchman.git
Cloning into 'watchman'...
remote: Counting objects: 18852, done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 18852 (delta 50), reused 64 (delta 27), pack-reused 18718
Receiving objects: 100% (18852/18852), 12.37 MiB | 1011.00 KiB/s, done.
Resolving deltas: 100% (12582/12582), done.
gd@gd10:/tmp$ cd watchman/
gd@gd10:/tmp/watchman$ git checkout v4.7.0
Note: checking out 'v4.7.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 93b67583 watchman: fixup recent test tweaks for windows
gd@gd10:/tmp/watchman$ sudo apt-get install -y autoconf automake build-essential python-dev libtool libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version (2.69-11).
automake is already the newest version (1:1.15.1-3ubuntu2).
build-essential is already the newest version (12.4ubuntu1).
libssl-dev is already the newest version (1.1.0g-2ubuntu4).
libtool is already the newest version (2.4.6-2).
python-dev is already the newest version (2.7.15~rc1-1).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
gd@gd10:/tmp/watchman$ ./autogen.sh
configure.ac:21: installing './compile'
configure.ac:2: installing './config.guess'
configure.ac:2: installing './config.sub'
configure.ac:3: installing './install-sh'
configure.ac:3: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
gd@gd10:/tmp/watchman$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for ranlib... ranlib
checking dependency style of gcc... gcc3
checking for arc... no
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for pcre-config... false
checking for PCRE using false... failed
checking for library containing pthread_create... -lpthread
checking for library containing socket... none required
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking port.h usability... no
checking port.h presence... no
checking for port.h... no
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/ucred.h usability... no
checking sys/ucred.h presence... no
checking for sys/ucred.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for mkostemp... yes
checking for kqueue... no
checking for port_create... no
checking for inotify_init... yes
checking for strtoll... yes
checking for localeconv... yes
checking for statfs... yes
checking for accept4... yes
checking for inotify_init1... yes
checking for getattrlistbulk... no
checking for openat... yes
checking for fdopendir... yes
checking for sys/vfs.h... yes
checking for sys/param.h... yes
checking for sys/mount.h... yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking valgrind/valgrind.h usability... no
checking valgrind/valgrind.h presence... no
checking for valgrind/valgrind.h... no
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking CoreServices/CoreServices.h usability... no
checking CoreServices/CoreServices.h presence... no
checking for CoreServices/CoreServices.h... no
checking for FSEventStreamSetExclusionPaths... no
checking for backtrace... yes
checking for backtrace_symbols... yes
checking for backtrace_symbols_fd... yes
checking for sys_siglist... yes
checking for memmem... yes
checking for struct statvfs.f_fstypename... no
checking for struct statvfs.f_basetype... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating thirdparty/jansson/jansson_config.h
config.status: creating config.h
config.status: executing depfiles commands

Your build configuration:

        CPPFLAGS =  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
        CFLAGS = -g -O2 -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer
        LDFLAGS =
        prefix: /usr/local
        version: 4.7.0
        state directory: /usr/local/var/run/watchman

但在make命令后开始出错。

gd@gd10:/tmp/watchman$ make
make  all-am
make[1]: Entering directory '/tmp/watchman'
  CC       thirdparty/libart/src/art.o
  AR       libart.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       thirdparty/libtap_a-tap.o
  AR       libtap.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       thirdparty/wildmatch/wildmatch.o
  AR       libwildmatch.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       thirdparty/jansson/libwmanjson_a-dump.o
  CC       thirdparty/jansson/libwmanjson_a-error.o
  CC       thirdparty/jansson/libwmanjson_a-hashtable.o
  CC       thirdparty/jansson/libwmanjson_a-load.o
  CC       thirdparty/jansson/libwmanjson_a-memory.o
  CC       thirdparty/jansson/libwmanjson_a-pack_unpack.o
  CC       thirdparty/jansson/libwmanjson_a-strbuffer.o
  CC       thirdparty/jansson/libwmanjson_a-strconv.o
  CC       thirdparty/jansson/libwmanjson_a-utf.o
  CC       thirdparty/jansson/libwmanjson_a-value.o
  AR       libwmanjson.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       watchman-argv.o
  CC       watchman-envp.o
  CC       watchman-spawn.o
  CC       watchman-opt.o
  CC       watchman-cfg.o
  CC       watchman-clockspec.o
  CC       watchman-checksock.o
  CC       watchman-fstype.o
  CC       watchman-log.o
  CC       watchman-ignore.o
  CC       watchman-json.o
  CC       watchman-bser.o
  CC       watchman-expflags.o
  CC       watchman-hash.o
hash.c: In function ‘w_hash_bytes’:
hash.c:228:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 12: c+=((uint32_t)k[11])<<24;
                ~^~~~~~~~~~~~~~~~~~~~~~~
hash.c:229:7: note: here
       case 11: c+=((uint32_t)k[10])<<16;
       ^~~~
hash.c:229:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 11: c+=((uint32_t)k[10])<<16;
                ~^~~~~~~~~~~~~~~~~~~~~~~
hash.c:230:7: note: here
       case 10: c+=((uint32_t)k[9])<<8;
       ^~~~
hash.c:230:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 10: c+=((uint32_t)k[9])<<8;
                ~^~~~~~~~~~~~~~~~~~~~~
hash.c:231:7: note: here
       case 9 : c+=k[8];
       ^~~~
hash.c:231:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 9 : c+=k[8];
                ~^~~~~~
hash.c:232:7: note: here
       case 8 : b+=((uint32_t)k[7])<<24;
       ^~~~
hash.c:232:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 8 : b+=((uint32_t)k[7])<<24;
                ~^~~~~~~~~~~~~~~~~~~~~~
hash.c:233:7: note: here
       case 7 : b+=((uint32_t)k[6])<<16;
       ^~~~
hash.c:233:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 7 : b+=((uint32_t)k[6])<<16;
                ~^~~~~~~~~~~~~~~~~~~~~~
hash.c:234:7: note: here
       case 6 : b+=((uint32_t)k[5])<<8;
       ^~~~
hash.c:234:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 6 : b+=((uint32_t)k[5])<<8;
                ~^~~~~~~~~~~~~~~~~~~~~
hash.c:235:7: note: here
       case 5 : b+=k[4];
       ^~~~
hash.c:235:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 5 : b+=k[4];
                ~^~~~~~
hash.c:236:7: note: here
       case 4 : a+=((uint32_t)k[3])<<24;
       ^~~~
hash.c:236:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 4 : a+=((uint32_t)k[3])<<24;
                ~^~~~~~~~~~~~~~~~~~~~~~
hash.c:237:7: note: here
       case 3 : a+=((uint32_t)k[2])<<16;
       ^~~~
hash.c:237:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case 3 : a+=((uint32_t)k[2])<<16; 

根据它的解决方案,我删除了目录,但它给出了同样的错误。

software-installation make nodejs ubuntu-make
  • 7 个回答
  • 28842 Views
Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-04-07 20:46:33 +0800 CST

react-native watchman 错误,在 Ubuntu 17.10 上启动 npm 之后。

  • 2

我正在尝试在 Ubuntu 上启动 React-native 项目,node、npm 是最新版本。根据文档,我已经安装了所有官方create-react-native-app及其依赖项。

这是 npm start 后的输出屏幕

gd@gd:~/Desktop$ cd testing7/
gd@gd:~/Desktop/testing7$ npm start

> [email protected] start /home/gd/Desktop/testing7
> react-native-scripts start

10:01:07: Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...
Scanning folders for symlinks in /home/gd/Desktop/testing7/node_modules (44ms)
Loading dependency graph.



jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
  Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
  Error: Watchman error: A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1523075484: opendir(/home/gd/Desktop/testing7/node_modules/metro/node_modules/ansi-regex) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-opendir. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

截屏

dependencies npm
  • 4 个回答
  • 5648 Views
Martin Hope
GD- Ganesh Deshmukh
Asked: 2018-02-12 09:24:50 +0800 CST

无法在 Ubuntu 17 上重新安装 MongoDB

  • 10

我在 MongoDB 之前卸载了但现在由于此错误而无法安装它:

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe).

我运行了这个命令->sudo apt-get install -y mongodb-org

我的终端输出如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libboost-chrono1.62.0 libboost-program-options1.62.0 libgoogle-perftools4
libtcmalloc-minimal4 libunwind8 libyaml-cpp0.5v5 linux-headers-4.13.0-16
linux-headers-4.13.0-16-generic linux-headers-4.13.0-21
linux-headers-4.13.0-21-generic linux-image-4.13.0-16-generic
linux-image-4.13.0-21-generic linux-image-extra-4.13.0-16-generic
linux-image-extra-4.13.0-21-generic linux-signed-image-4.13.0-16-generic
linux-signed-image-4.13.0-21-generic mongo-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/66.8 MB of archives.
After this operation, 276 MB of additional disk space will be used.
Selecting previously unselected package mongodb-org-shell.
(Reading database ... 316734 files and directories currently installed.)
Preparing to unpack .../mongodb-org-shell_3.6.2_amd64.deb ...
Unpacking mongodb-org-shell (3.6.2) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_3.6.2_amd64.deb ...
Unpacking mongodb-org-server (3.6.2) ...
Selecting previously unselected package mongodb-org-mongos.
Preparing to unpack .../mongodb-org-mongos_3.6.2_amd64.deb ...
Unpacking mongodb-org-mongos (3.6.2) ...
Preparing to unpack .../mongodb-org-tools_3.6.2_amd64.deb ...
Unpacking mongodb-org-tools (3.6.2) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.6.2_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.2.11-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_3.6.2_amd64.deb ...
Unpacking mongodb-org (3.6.2) ...
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-tools_3.6.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行后apt --fix-broken install,输出如下:

apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libboost-chrono1.62.0 libboost-program-options1.62.0 libgoogle-perftools4 libtcmalloc-minimal4 libunwind8 libyaml-cpp0.5v5 linux-headers-4.13.0-16
  linux-headers-4.13.0-16-generic linux-headers-4.13.0-21 linux-headers-4.13.0-21-generic linux-image-4.13.0-16-generic
  linux-image-4.13.0-21-generic linux-image-extra-4.13.0-16-generic linux-image-extra-4.13.0-21-generic linux-signed-image-4.13.0-16-generic
  linux-signed-image-4.13.0-21-generic mongo-tools
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/34.9 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 316761 files and directories currently installed.)
Preparing to unpack .../mongodb-org-tools_3.6.2_amd64.deb ...
Unpacking mongodb-org-tools (3.6.2) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.6.2_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.2.11-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-tools_3.6.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
server mongodb 17.04 npm
  • 1 个回答
  • 17587 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